Akagi201
5/20/2014 - 3:36 PM

openwrt-crontab.md

格式

  • 分 时 日 月 周 命令

配置

  1. crontab -l 出错 can't open 'root'...., 估计是crontab的小bug, 运行一遍crontab -e再退出, 就解决了, 原因不明.
  2. Akagi201: I'd expect: { crontab -l; echo 1 2 3 4 5 6 7 your command } | crontab -e to work

21:44 ukleinek: Akagi201: crontab -, not crontab -e

you might want to add a filter though. My Debian's crontab manpage says: The "out-of-the-box" behaviour for crontab -l is to display the three line "DO NOT EDIT THIS FILE" header that is placed at the beginning of the crontab when it is installed. The problem is that it makes the sequence crontab -l | crontab - non-idempotent.

yunfan: of cause you can 21:51 yunfan: Akagi201: use crontab -i which would accept stdin as the content

http://bbs.chinaunix.net/thread-1697310-1-1.html

Refs

root用户加到这个文件

echo "* * * * * /xxxxx > /dev/null 2>&1" >> /var/spool/cron/root