LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 10-19-2009, 04:20 PM   #1
boyd98
Member
 
Registered: Oct 2003
Posts: 156

Rep: Reputation: 15
how do i get a cronjob to run every two hours in AIX: 00 */2 * * * command no work


I've read in most OS's you can do a */2 to say run a cron job every two hours, but in AIX it doesn't like the format

Is there a workaround besides

00 00,2,4,6,8,10,12,14,16,18,20,22 * * * command


Thx,

Boyd
 
Old 10-19-2009, 06:33 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
You've tried "0 */2 * * * command", and it doesn't work?

Have you tried "0 0-22/2 * * * command"?

If neither of those work, then you're stuck with "0 0,2,4,6,8,10,12,14,16,18,20,22 * * * command".

I searched around a bit for AIX man pages. Best reference I could find, though, was the Wikipedia cron page, and the only reference it had to idiosyncrasies of AIX was not recognizing 7 as a day.

Just as a side comment, if all your hourly things run at minute 0, they're going to bunch up. If the only restriction is just they they run once an hour (or two), pick odd (different) values for the minutes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] make cronjob run every 10mins qwertyjjj Linux - Newbie 2 08-13-2009 08:06 PM
only run cronjob when asteriks voip gives 0 on channels 1c3c0ld Programming 1 10-08-2008 07:07 PM
Cronjob does not work niner710 Linux - Newbie 11 05-07-2008 03:45 AM
why do these cronjob not run? SheldonPlankton Linux - General 1 01-05-2005 08:01 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration