Friday, April 23, 2010

CronJob

Here is the crontab code:
# start apache on reboot
@reboot mount -t ext3 /dev/sdf /opt/
@reboot /etc/init.d/httpd start
# start mysqld on reboot
@reboot /etc/init.d/mysqld start
*/10 * * * * /usr/bin/php /opt/www/cron/test.php
10 * * * * /usr/bin/php /opt/www/cron/test1.php
25 14 * * * /opt/www/cron/rotatelogs.sh
*/02 * * * * sh /opt/www/cron/imagedata_upload.sh >> /opt/www/cron/imagedataoutput.log

To set crontab for a particular user like webdoc, use command :
crontab -e -u webdoc

No comments:

Post a Comment