• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Scheduling php script problem

D

damargon

Guest
I am trying to execute a php script from "Scheduled Tasks". I have created the cron task in root and apache user by this way in the command field:

/var/www/vhosts/mydomain/httpdocs/script.php

but I am getting this error:

***************************************
/bin/sh: line 1: /var/www/vhosts/mydomain/httpdocs/script.php: Permission denied
***************************************

I have changed the script's chmod to rwx r-x r-- but I'm getting the same error.

Anyone can help me please?

Thanks!!
 
Well, I have resolved the problem.

I have forgotten to especified in the command field which is gonna be the interpreter: php.

This is the line:
php var/www/vhosts/mydomain/httpdocs/script.php

Now it works fine, thanks!
 
Back
Top