• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Cron not running

Donn_Helela

New Pleskian
Hi, I have just recently moved to Plesk web admin from cpanel. I have been trying to get the cron to run for the past 48 hours but no luck. Bellow is the code i have been trying to execute via cron but It does not run. Is there any a place i'm doing wrong?

"/usr/bin/php /var/www/vhosts/mydomain.com/httpdocs/billing/index.php cron"
 
Hi Donn_Helela,

any errors? Any log - investigations which point to your issue/problem? It's really hard to guess what might be the cause, if you don't provide informations. We could help you with your investigations, but only guessing won't help you.
 
Hi Donn_Helela,

any errors? Any log - investigations which point to your issue/problem? It's really hard to guess what might be the cause, if you don't provide informations. We could help you with your investigations, but only guessing won't help you.

Thanks, I really wan't to provide much information on this but, I went to the logs, nothing regarding cron was found nor is there an error. The only problem i can clearly observe is that my the cron tasks are not done + last cron run does not update.

This is the cron command specified in the Billing system. "/usr/bin/php /var/www/vhosts/mydomain.com/httpdocs/billing/index.php cron" But putting this on plesk scheduled tasks does not execute tasks. I tried modifying the command using the knowledge base but no luck.

I'm using Plesk webadmin edition 12.
 
Hi Donn_Helela,

just for your understanding: A cronjob is nothing else than a command scheduled on a specific time... so please try out the command over ssh to be sure, that the whole command is correct.

As you can see in the past examples here in this thread, you don't have to define the path to the binary PHP ... and it might as well be located else where on your system ( /usr/bin/php5 ... /usr/sbin/php ... /usr/local/bin/php ). Just use "php" instead of all other suggestions, when you would like to perform a PHP command. It doesn't depend which Plesk version you use, but WHERE your PHP - binary is installed. If you would like to be sure, please use the command "which php" or "whereis php" over the command line, to get the absolute correct path.

Example which should work: php /var/www/vhosts/mydomain.com/httpdocs/billing/index.php cron

If you try out this command over ssh, there are two possible results: Either the command is successfull, or it will show errors after you hit enter/return.
 
I ran "php /var/www/vhosts/mydomain.com/httpdocs/billing/index.php cron" via command and It worked. I then ran "whereis php" and got the path.
"/usr/bin/php"

But running the command starting with php /var/ does not execute the command in cron nor adding /usr/bin/php /var

Website & Domains > Scheduled tasks . Is this the correct place?
 
Back
Top