How to schedule a task in Plesk for Linux?




  • Avatar

    Hi, I need to run this cron task: php -q /var/www/vhosts/domain/httpdocs/folder/cron.php >/dev/null 2>&1

    These are the literal instructions from the service provider:


    How do I enter this, as "Run as command" results in error:


    Also, what's the best user to select for the job?:


    Comment actions Permalink
  • Avatar
    Daria Gavrilova

    Hello @Mario,

    Thank you for your question.

    As I can see the issue was resolved in the scope of the ticket and it was suggested to run the script with any installed Plesk PHP:

    /opt/plesk/php/7.1/bin/php -q /var/www/vhosts/ 2>&1
    Comment actions Permalink
  • Avatar
    Marco Marsala (Edited )

    I want to report a bug in Scheduled task feature and how to reproduce.

    1. Create a scheduled task with the following command:


    (note the typo, comma instead of dot).

    2. Save.

    It will show a "parse error" but it will save.

    3. Now you cannot open again Scheduled Task because you will face "parse error". Even from Tools & Settings > Scheduled Task you cannot edit the wrong command due to same error. Any user without SSH access is then stuck here.

    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request