Getting Cron Scheduled Tasks To Work In Plesk

So you've found that it is impossible to run your scheduled / cron tasks from a Parallel's subscription, sometimes resulting in having to create the task from the main hosting control panel and running them as root, right?

You assume the correct thing to do would be run each domain's individual tasks from their own control panel, and you are right.

Since you have searched the internet and support sites all over, you will be surprised that this is a one step fix.  Really!

Assuming your tasks run properly using the root user, this will be a simple fix for you.

  1. From the domain control panel
  2. Select ftp access
  3. Click on the subscription owner's FTP account (The one with the world icon)
  4. Change the access to the server to /bin/bash
  5. Click on OK to save

And That's it!!!  You can stop pulling your hair if you have any left.

Re-enable all your tasks, remember to disable the root ones, and you should be good.

Remember To Call Your Scripts with the appropriate program:

NB - If you migrated your domain, or upgraded from a previous Plesk Panel, your tasks will show enabled, but they will not have the "green" checkmark.  Only way I found around this is to re-create the task and delete the old one.


Cron Examples:

  • /usr/bin/perl /var/www/vhosts/domain.com/cgi-bin/crontasks/cron.pl
  • /usr/bin/php -q /var/www/vhosts/domain.com/cgi-bin/crontasks/cron.php
  • /usr/bin/wget -q -O /dev/null http://domain.com/script.php
  • /usr/bin/curl -sL http://domain.com/script.php >/dev/null

If you still find that you, "Can't run php file from plesk scheduled tasks" please let us know and we will create step by step instructions on how to do this.  If all this fails, you can try this article to see if it helps.

  • 2 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Powered by WHMCompleteSolution