Cronjobs not running/updating

CyberPanel version

Current Version: 2.3
Build: 4

Current Commit:
2b7c8104b47669c609a28e468bbd435ec2192827

Latest Version: 2.3


I have a server in Vultr with CyberPanel and recently I was reported that the cronjobs were not working, I made sure that the crond was active and it is, I checked the cron command and it works properly, then I noticed that if I restart the server then if the cronjob that was added is activated, but I also noticed that if I try to update the command, for example change the output to another file, it continues writing in the output defined at the beginning.

In other words, initially the command after the restart was :

wget -O /home/example.com/public_html/cronTest.txt https://example.com/example.php

works at that point, but if I then change the output of the cron to another one in order to make the behavior different

what happens is that it still keeps the effect of the command after the server restart and not the new one, since the output is still the same as before and not the new one.

It should be noted that the cronjob is being added through the cyberpanel, not manually or anything like that.

Another server with the same version of CyberPanel has the same issue but on AWS

Recently a friend asked me for help. He was having the same problem.

I was informed about the CyberCP code and it actually has a bug that only happens on Debian, Ubuntu or Ubuntu-based distros.

To fix the error you are editing the file /usr/local/CyberCP/websiteFunctions/website.py
on line 3579 you will put the following code

        if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu or ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu20:
            command = 'systemctl restart cron'
            ProcessUtilities.executioner(command)

Add the same code on line 3539.

This will make cronjob restart every time there is a change.

Restart CyberCP after changes

systemctl restart lscpd

This is a patchwork fix until an update fixes this

1 Like