vote up 0 vote down star

Simple question- what would a crontab entry look like for a command I want to run every week on Saturday at 8:05 AM?

flag
easily discernible through Google and an invitation to several equally good, because identical, answers – George Jempty Nov 7 at 17:44

migrated from stackoverflow.com

6 Answers

vote up 3 vote down

These answers are all correct, if you are unaware of how to use cron in the future, use one of many cron generators.

link|flag
vote up 3 vote down

That should do it:

5 8 * * 6 <user> <command>

documentation (man 5 crontab):

              field          allowed values
              -----          --------------
              minute         0-59
              hour           0-23
              day of month   1-31
              month          1-12 (or names, see below)
              day of week    0-7 (0 or 7 is Sun, or use names)
link|flag
vote up 1 vote down

Sat 8:05AM run find

# Minute   Hour   Day of Month       Month          Day of Week        Command    
# (0-59)  (0-23)     (1-31)    (1-12 or Jan-Dec)  (0-6 or Sun-Sat)                
    5       8          *             *                Sat              /usr/bin/find
link|flag
vote up 1 vote down

From extensive investigation of "man 5 crontab", it looks like this'll do the trick:

5 8 * * sat /usr/bin/man 5 crontab

link|flag
vote up 0 vote down
5     8     *     *     6         *your command*
link|flag
vote up 0 vote down

http://www.scrounge.org/linux/cron.html

5 8 * * 6 /usr/bin/foo

...to run every week on Saturday at 8:05 AM

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.