红联Linux门户
Linux帮助

自动运行PHP页面

发布时间:2009-04-07 16:03:31来源:红联作者:lqgef
设置crontab如下.
02 4 * * * root run-parts /etc/cron.daily
然后在把你写好的shell script拷贝到
/etc/cron.daily
目录里.

你的shell script可以这样写:
文件名:AFOS
#!/bin/sh

php -q /home/afos/rename.php

其中rename.php就是你要定期执行的php文件.
要用chmod使AFOS文件可执行.

2 11 * * * root run-parts /etc/cron.daily


朋友们帮忙看看.有没有什么问题


chkconfig --levels 35 crond on
文章评论

共有 0 条评论