# How Crontab works

**URL:** <https://forums.thehomestack.io/t/how-crontab-works/281>\
**Category:** Linux - General\
**Created:** [July 10, 2007, 11:53am UTC](https://forums.thehomestack.io/t/how-crontab-works/281 "2007-07-10T11:53:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://forums.thehomestack.io/uploads/default/original/1X/161426793bc0d8bdf0d1a6692b3e44446861cc72.jpeg) [@system](https://forums.thehomestack.io/u/system)\
**Post date:** [July 10, 2007, 11:53am UTC](https://forums.thehomestack.io/t/how-crontab-works/281/1 "2007-07-10T11:53:04Z")

</div>

Crontab -e

MIN Minute 0-60  
HOUR Hour [24-hour clock] 0-23  
MDAY Day of Month 1-31  
MON Month 1-12 OR jan,feb,mar,apr …  
DOW Day of Week 0-6 OR sun,mon,tue,wed,thu,fri,sat  
COMMAND Command to be run Any valid command-line

```auto
# MIN HOUR MDAY MON DOW COMMAND 
   5 * * * * echo 'Hello' 

```

```auto
#Run command at 7:00am each weekday [mon-fri]
00 07 * * 1-5 mail_pager.script 'Wake Up'

#Run command on 1st of each month, at 5:30pm
30 17 1 * * pay_rent.script

#Run command at 8:00am,10:00am and 2:00pm every day
00 8,10,14 * * * do_something.script

#Run command every 5 minutes during market hours
*/5 6-13 * * mon-fri get_stock_quote.script

#Run command every 3-hours while awake
0 7-23/3 * * * drink_water.script 

```
