1753808 Members
7506 Online
108805 Solutions
New Discussion юеВ

cron

 
SOLVED
Go to solution
Adam W.
Valued Contributor

cron

Sorry all cron confuses my simple mind. I need a script to run every sunday at 4:30 pm so would that entry be:

30 16 * * 7 {SCRIPTNAME}> /dev/null
There are two types of people in the world, Marines and those who wish they were.
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: cron

Close, but Sunday is 0, not 7.


Pete

Pete
Avinash20
Honored Contributor

Re: cron

SUNDAY == 0

30 16 * * 0 {SCRIPTNAME}> /dev/null

Why do you like to redirect the output to /dev/null

Redirect the output to some file to troubleshoot in case cron does not run and

2&1>/dev/null
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Adam W.
Valued Contributor

Re: cron

Roger that. Thanks Pete.
There are two types of people in the world, Marines and those who wish they were.
Adam W.
Valued Contributor

Re: cron

Avinash, normally I would, but this is for a command line scanner that we just have to run for our IA people to quit complaining. But since no windows files go through this machine, there shouldn't ever be any results.
There are two types of people in the world, Marines and those who wish they were.
Steven Schweda
Honored Contributor

Re: cron

> [...] there shouldn't ever be any results.

All the more reason to save the (null)
results somewhere. You shouldn't waste much
disk space, and it'd be easy to verify your
assumption(s).
Dennis Handly
Acclaimed Contributor

Re: cron

>there shouldn't ever be any results.

If there are no results at all, you could just let unusual errors be mailed to you.