schedule

Automation task In Linux Using Crontab

Automation task in Linux, cron daemon is a long running process which executes commands at specific time and day. It’s used to scheduling a task in Linux.

We can schedule at one time task with at command and it has atd daemon which is By default installed and enable automatically. We’ve another way to schedule a task with crontab command

Check Out : How To Clear Cache In Linux

Syntax of at command is at <timespec>  and after writing the command you can finish it with ctrl+D

To view pending job by atq or at –L

If you want to remove a job use this atrm <jobnumber>

Scheduling jobs :

crontab –L          – list the jobs for current user

crontab –r          – remove all job of current user

For editing the crontab for user

crontab –e         

Check Out : Installation of Awstats For Analyzing Apache Logs

Format of crontab :

{min(s)   hour(s)    day(s)   month(s)   weekday(s)   command(s) }

min(s) – > 0-59

hour(s) -> 0-23

day(s) -> 1-31

month(s) -> 1-12

weekday(s) -> 0-6

crontab –v displays the last time you edited your crontab file

Leave a Reply

avatar
  Subscribe  
Notify of