1.

Solve : crontab php scripts not running?

Answer»

hi, i created a php script for cron. its working when RUN in COMMAND line (ie: /var/www/html/folder/scripts/FILE.php)

i schedule the cron job at 11 21 * * * /var/www/html/folder/scripts/file.php but it didnt work. it is suppose to put some data into mysql but i dun see the data being captured. i already set the permission to 755.. on each php file that are involved, i set #!/usr/bin/php above
wat should i do?? is that anything i missed??1) make sure crond is running. use ps to check the process
2) make sure the one executing the script has permission to do so.

Who is running the script? whose cron job is it? is it root?yup im running as root and cron another USER group file.

this is wat i get from ps:
PID TTY TIME CMD
31002 pts/1 00:00:00 su
31003 pts/1 00:00:00 bash
31035 pts/1 00:00:00 ps
alrite solved. i got it to work by CHMOD execute to user and group and also chown root for user and group.. my bad.. tks anw



Discussion

No Comment Found