1.

What Is Crontab And Explain The Fields In A Crontab ?

Answer»

The cron is a deamon that EXECUTES commands at specific dates and TIMES in linux. You can use this to schedule activities, either as one-time events or as recurring tasks. Crontab is the program used to install, deinstall or list the tables used to drive the cron daemon in a server. Each user can have their own crontab, and though these are files in /var/spool/cron/crontabs, they are not intended to be edited directly. Here are few of the command line options for crontab.

crontab -e Edit your crontab file.
crontab -l Show your crontab file.
crontab -r Remove your crontab file.

Traditional cron format consists of six fields separated by white spaces:

The format is explained in detail below.

* * * * * *

| | | | | |

| | | | | +– Year (range: 1900-3000)

| | | | +—- Day of the Week (range: 1-7, 1 standing for MONDAY)

| | | +—— MONTH of the Year (range: 1-12)

| | +——– Day of the Month (range: 1-31)

| +———- Hour (range: 0-23)

+———— MINUTE (range: 0-59)

The cron is a deamon that executes commands at specific dates and times in linux. You can use this to schedule activities, either as one-time events or as recurring tasks. Crontab is the program used to install, deinstall or list the tables used to drive the cron daemon in a server. Each user can have their own crontab, and though these are files in /var/spool/cron/crontabs, they are not intended to be edited directly. Here are few of the command line options for crontab.

crontab -e Edit your crontab file.
crontab -l Show your crontab file.
crontab -r Remove your crontab file.

Traditional cron format consists of six fields separated by white spaces:

The format is explained in detail below.

* * * * * *

| | | | | |

| | | | | +– Year (range: 1900-3000)

| | | | +—- Day of the Week (range: 1-7, 1 standing for Monday)

| | | +—— Month of the Year (range: 1-12)

| | +——– Day of the Month (range: 1-31)

| +———- Hour (range: 0-23)

+———— Minute (range: 0-59)



Discussion

No Comment Found