ubuntu下计划任务cron的使用

一、启动与停止
  ubuntu下启动、停止与重启cron
  sudo /etc/init.d/cron start
  sudo /etc/init.d/cron stop
  sudo /etc/init.d/cron restart
 
二、查看cron是否在运行
  pgrep cron

 

三、crontab命令主要有3个参数

-e :编辑用户的crontab。

-l  :列出用户的crontab的内容。

-r  :删除用户的crontab的内容。

* * * * * 分 时 日 月 年

四、完整操作

crontab -e

* * * * * /var/www/dsa.php >> /var/www/cron.txt

 

posted @ 2013-03-19 11:05  忆殇之痕  阅读(189)  评论(0编辑  收藏  举报