[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NEWBIE: cron



Erik Steffl wrote:
> > I am new to cron tasks and I can not find out how I can run a task every
> > minute. I have now this line in /etc/crontab:
> > # m h dom mon dow user  command
> > 1 0 * * *       root    date >> /home/dating
> > This should export the date every minute to /home/dating, but it does not
> > seem to work.
> > And what do dom, mon  and dow mean? I guess 'do monthly' and 'do weekly',
> > but the middle one does not make sense to me.

m - what minute of the hour (NOT every m minutes - yours will run
    at 1 past the hour)
h - what hour of the day (NOT every h hours - yours will run at 0 
    oclock)
dom - Day of month (1-31)
mon - Month (1-12)
dow - Day of week (1-7)

"*" means "all of them".

So to make something run every minute, every hour, every day,
every month, every weekday, you just simply put
* * * * * root date >> /home/dating


bekj

-- 
: --Hacker-Neophile-Eclectic-Geek-Grrl-Queer-Disabled-Boychick--
: gossamer@tertius.net.au   http://www.tertius.net.au/~gossamer/
: Don't ever think you know what's right for the other person.  He
: might start thinking he knows what's right for you.
: -- Paul Williams, 'Das Energi'



Reply to: