-
Install Crontab in ArchLinux
$ pacman -S cronie
-
Enable the cronie at startup.
$ systemctl enable cronie.service
$ systemctl start cronie.serviceDisplay the crontab jobs
$ crontab -l
-
Edit the crontab jobs:
MAILTO=your@email
LOGFILE=/var/log/cron-pacman.log1. minute (0-59)
| 2. hour (0-23)
| | 3. day of month (1-31)
| | | 4. month (1-12)
| | | | 5. day of week (0-7: 0 or 7 is Sun, or use names)
| | | | | 6. commandline
| | | | | |
#min hr dom mon dow command
00 13 * * * . /etc/profile && (echo; date; yes |pacman -Syuq) &>>$LOGFILE || (echo ‘pacman failed!’; tail $LOGFILE; false)
00 13 * * * updatedb && date>>/root/done.txt
archlinux crontab安装
最新推荐文章于 2023-10-24 21:17:45 发布