Crontab - a quick glance
crontab
is a powerful tool for automation. One of the most common usages nowadays is certification renewal, no matter using certbot
or acme.sh
.
Edit task
Edit crontab
for current user
crontab -e
Edit crontab
for root user
sudo crontab -e
Edit crontab
for specific user
crontab -u <username> -e
List task
crontab -l
is used for this purpose
Test crontab rules
crontab.guru could be used for this purpose, which provides a nice visualized interface for either beginners or advanced users.
The following examples can also be used for quick reference
Check if tasks are executed correctly
grep -i cron /var/log/syslog