Azurel
Silver Pleskian
EDIT: Solution is not to use "plesk bin <command>" and use instead "/usr/local/psa/bin/<command>" in cronjob.
I have created a php command-line script with command
As root in shell with putty that line is working!
I added it as cronjob (every minute) /etc/cron.d/myscript with this line
Now I get a cron mail with
What am I missing here?
I have created a php command-line script with command
Code:
shell_exec('plesk bin <command>');
As root in shell with putty that line is working!
Code:
# /opt/plesk/php/7.4/bin/php /var/www/vhosts/example.com/myscript.php
I added it as cronjob (every minute) /etc/cron.d/myscript with this line
Code:
*/1 * * * * root /opt/plesk/php/7.4/bin/php /var/www/vhosts/example.com/myscript.php
Now I get a cron mail with
sh: plesk: command not found
What am I missing here?
Last edited: