• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

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