Cronjobs doesn't works wirth CyberPanel, but they works through SSH

1.2k views Asked by At

I've configured the below 2 cronjobs with 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

into the /var/log/cron I can see that the trigger starts every minutes as expected, as below:

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 no actions are performed by the code (I expect to have new rows into the DB)

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

Any suggestions?

1

There are 1 answers

0
SWeC On

Configuring it directly with

crontab -e 

everything is working fine. Still impossible to run the cronjobs from CyberPanel but the manual configuration works in the case is needed. If anyone knows how to fix also the CyberPanel post the answer :)

  • the only difference that I've found is the user that runs the command, in the case of "crontab" is the root, in the case of CyberPanel, is the account's user, who maybe have not the proper grants.