Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- How to create a PHP cron job


dbarasuk - 2:53 pm on Aug 10, 2012 (gmt 0)


Dear swa66,
1) To add a line to a cron i do: crontab -e
2) To see what's in my crontab i do: crontab -l
3) Result of running crontab -l
on my machine is: 02 19 * * * sh /root/runphp.sh. Minutes and hour is changed frequently for testing purposes
4) Content of /root/runphp.sh using vi/vim:
#!/bin/sh
/usr/bin/php /var/www/html/rcms/includes/exportMysqlToOracle.php

5) File exportMysqlToOracle.php start by <?php and end with ?>
6) permission on /root/runphp.sh as shown by ls -ltr /root/runphp.sh is: -rwxr-xr-x 1 root root 75 Aug 10 16:45 /root/runphp.sh

I don't see what i've missed for this not to work. Please help


Thread source:: http://www.webmasterworld.com/php/4482541.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com