Skip to content

Cronjob

A cron job is a linux command used for scheduling tasks

To open crontab, where we will schedule jobs

sh
crontab -e

These below five * represent the following: Minute Hour Day Month Weekday

sh
* * * * * /usr/bin/git pull

To check the logs

sh
grep CRON /var/log/syslog

To output no logs

sh
* * * * * yourCommand >/dev/null 2>&1

To list all cron jobs

sh
crontab -l