How to set the maximum execution time for a scheduled PHP script in Plesk?
In Plesk go to Tools & Settings > Scheduled Tasks > Add Task.
Set task type as Run a command.
In the Command field, put the full path to the script and specify the directive
PLESK_INFO: /opt/plesk/php/X.X/bin/php -f '/root/example.php' -d max_execution_time=10
/opt/plesk/php/X.X/bin/php- path to the PHP Handler
max_execution_time- time limit for script execution
In the Run field set the the task execution time.
In the System user field leave user as "root" or choose another system user to run the task.
Click OK to create a new task.