Crontab run every year at 1 am on 1st of April


This post will guide you setup a crontab to run every year at 1 am on 1st of April

minute(s)hour(s) in
24h format
day(s) of
month (s)weekdaysapplication path
1: Jan
2: Feb
3: Mar
4: Apr
5: May
6: Jun
7: Jul
8: Aug
9: Sep
10: Oct
11: Nov
12: Dec
0: Sunday
1: Monday
2: Tuesday
3: Wednesday
4: Thursday
5: Friday
6: Saturday

Final command: * 1 1 4 * /cfg9/

Some special characters used in crontab

*Any value
,Value list separator
Range of values
/Step values

What is cron & crontab

cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals.

crontab is a UNIX command that creates a table or list of commands, each of which is to be executed by the operating system at a specified time.

Basic crontab command guide

This is some basic crontab commands you’ll use a lot.

crontab -eEdit your crontab file, or create one
if it doesn’t already exist.
crontab -lDisplay/List your crontab file
crontab -rRemove your crontab file
crontab -u usernameDisplay/Modify crontab file
belonging to a specific user if you are root

More detail on crontab command can be found with this command:

man crontab