What’s cron

When I use Linux at my work, I heard the word “cron” and I couldn’t understand it. So I searched and summarized about cron.

Overview

Cron is the one of programs in the UNIX based OS, and run the specified program following the program when the time comes.

 

If you want to edit the instruction for cron, you can use the command “crontab” which have option “crontab -e”, “crontab -l” and so on.

Example

For example, let’s say that you have given the following instructions to cron.

20 9,10,15 * * * /home/power.exe

In “20 9,10,15 * * *” part, you have specified the time to run program, and it means “minute, hour, date, month, day of week” from left. So “20 9,10,15 * * * ” means following date and time.

Minute: 20

Hour: 9,10,15

Date: *(all)

Month: *(all)

Day of week: *(all)

 

In other words, power.exe run at 9:20, 10:20, 15:20 everyday. 

Comment

Copied title and URL