Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Other *NIX Forums > AIX
User Name
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.


  Search this Thread
Old 10-19-2009, 05:20 PM   #1
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


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

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.


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 09:06 PM
only run cronjob when asteriks voip gives 0 on channels 1c3c0ld Programming 1 10-08-2008 08:07 PM
Cronjob does not work niner710 Linux - Newbie 11 05-07-2008 04:45 AM
why do these cronjob not run? SheldonPlankton Linux - General 1 01-05-2005 09:01 PM > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 06:48 AM.

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