• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

CRON not seeing scripts as PHP (ongoign even since 8.6 update :-(

A

alwoodman

Guest
Having recently updated to Plesk 8.6 i thought i better address some CRON issues i have had since i updated to 8.3 which caused all my LOG rotation to switch off...a problem which has been from the start is my CRON tabs are not being run or seen it appears as PHP scripts...

/var/www/vhosts/mydomain.info/httpdocs/RSS/doFilmBuild.php: line 1: ?php: No such file or directory
/var/www/vhosts/mydomain.info/httpdocs/RSS/doFilmBuild.php: line 2: =: command not found
/var/www/vhosts/mydomain.info/httpdocs/RSS/doFilmBuild.php: line 3: syntax error near unexpected token `('
/var/www/vhosts/mydomain.info/httpdocs/RSS/doFilmBuild.php: line 3: `$somecontent = file_get_contents('http://xmlgateway2.mydomain.net/partnersmysite/singlesite_v1243.asp?P=mydomain&bookingID=68');'

really baffled!
 
how are you running the file?

like

php -f /var/www/vhosts/mydomain.info/httpdocs/RSS/doFilmBuild.php

??
 
Yes, my cron job is like
php -f /var/www/vhosts/mydomain.info/httpdocs/RSS/doFilmBuild.php

but it's giving error
php: command not found
 
Try using the full path to php - you can probably get it from a phpinfo() script if you dont know it.
 
Well that would have been where I would think php is, /usr/bin/php - if you use that path does the error message change?

if you have shell access go to a prompt and type 'which php' to see where the path is, if you dont have shell, ask your provider in the event its not in the standard location.
 
Hey,

we have Suse 11.4 and Plesk 10.4.4 the same Problem. We migrate from 9.5.4 and the crons doesn`t work. Se we take:
/usr/bin/php
/usr/bin/php -c -f

and we put also the comand inside and outsinde the script, not want to run. When i do it in ssh, they work fine, without problems, bacuse i taste it as root.

thanks for fast Support.
Alex
 
Back
Top