Fedora 下 crontab 操作

来源:互联网 发布:java 常量类初始化map 编辑:程序博客网 时间:2024/06/06 02:05

Fedora 下 自动运行一些用户脚本:

 

1) crontab 格式说明:

    PC$ cat /etc/crontab

 

     # Example of job definition:
     # .---------------- minute (0 - 59)
     # |  .------------- hour (0 - 23)
     # |  |  .---------- day of month (1 - 31)
     # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
     # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
     # |  |  |  |  |
     # *  *  *  *  *  command to be executed

 

2) 编辑自己的crontab:

     PC$ crontab -e

 

3) List 用户的crontab:

     PC$ crontab -l

 

4) 用户crontab存放的位置:

     PC$ ls /var/spool/cron/