Cronjobs not working properly in CyberPanel but working fine via SSH
P粉369196603
P粉369196603 2024-03-26 09:47:03
0
1
461

I configured the following 2 cronjobs using the CyberPanel UI:

*   *   *   *   *   cd /home/marinisilvio.com/rarespot/rs-core/src; php ether_handler.php >> /var/log/rscore.log     
*   *   *   *   *   cd /home/marinisilvio.com/rarespot/rs-core/src/bitquery; php bq_collections.php >> /var/log/rscore.log

Going into /var/log/cron I can see that the trigger fires every minute as expected, like this:

Apr 21 07:30:01 rarespot CROND[36974]: (marin9572) CMD (cd /home/marinisilvio.com/rarespot/rs-core/src/bitquery; php bq_collections.php >> /var/log/rscore.log)

But nothing is printed in the log file (rscore.log) and the code does nothing (I want new rows in the database)

The weird thing is that if I run the same command using Putty, the code starts and works fine.

Any suggestions?

P粉369196603
P粉369196603

reply all(1)
P粉771233336

Direct configuration

crontab -e

everything is normal. It is still not possible to run cronjobs from CyberPanel, but manual configuration is required. If anyone knows how to fix CyberPanel, please post the answer :)

  • The only difference I found is that the user running the command, in the case of "crontab" is root, in the case of CyberPanel is the user of the account, who may not have the appropriate authorization.
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template