• We value your experience with Plesk during 2026
    Please help us understand which Plesk features made your work easier this year, what is still missing and how AI should help you in Plesk ?
    Take this short 5-minutes survey. Your answers go straight into the Plesk roadmap for 2027.

Issue Schedule Task won't do anything

LBarraud

New Pleskian
Hello,

I'm trying to schedule a task on Plesk and here is the problem:

/usr/bin/php /var/www/vhosts/mydomain.com/httpdocs/app/console crontask --env=prod

Have i tried to run this in CLI ? -> yes! and it works

But when i'm scheduling a task and try to execute it, i've got this message:
Task "/usr/bin/php /var/www/vhosts/mydomain.com/httpdocs/app/console crontask --env=prod" completed with an error in 0 second.

nothing more, nothing less.

Has anyone any clue?
 
By default, for the scheduled tasks configured as chrooted shell which not allowed it to use standard utilities such as php and GET. To allow users to execute standard commands available at the server you can execute the following command:

# /usr/local/psa/bin/server_pref --update -crontab-secure-shell ""

At this point, scripts will successfully execute via the scheduler. If you would like to restore original state, you can run following command in the shell:

# /usr/local/psa/bin/server_pref --update -crontab-secure-shell /bin/bash
 
I did what you said, and i still have the same message..

Task "/usr/bin/php /var/www/vhosts/mydomain.com/httpdocs/app/console crontask --env=prod" completed with an error in 0 second.
 
/var/www/vhosts/mydomain.com/httpdocs/app/console
does not look like a .php script. Is it a .php script?

Instead of running a shell command ("Run a command"), would it be an option to choose "Run a PHP script" and to omit the /usr/bin/php and move the parameters intot the parameters field of that option?
 
Back
Top