• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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