search

Home  >  Q&A  >  body text

Cronjobs not working properly in CyberPanel but working fine via SSH

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粉369196603P粉369196603242 days ago444

reply all(1)I'll reply

  • P粉771233336

    P粉7712333362024-03-27 00:19:45

    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. < /里>

    reply
    0
  • Cancelreply