Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Script every 4 minutes

Status
Not open for further replies.

dshaw21369

Programmer
Jul 8, 2002
64
I would like to run a script every four minutes
this does not work any suggestions?

4 * * * * /export/home/egate/Perl_Development/monitor_log.pl > /dev/null 2>&1

04 * * * * /export/home/egate/Perl_Development/monitor_log.pl > /dev/null 2>&1
 
Those scripts should run at four minutes after the hour.

Some versions of cron allow an entry like:

*/4 * * * * <script info....>

or

0,4,8,16,20,24,28,32,36,40,44,48,52,56 * * * * <script info....>

Check your manpages on cron and crontab to see if this is available. ______________________________________________________________________
TANSTAAFL!
 
let your script DECIDE not cron !!
in cron:
* * * * * script
in script:
#!/bin/sh
case `date +%M` in [135][26]|[024][048])
;; *) exit
;; esac

do the job.... -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top