• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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