The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
crontab entry to run every last day of the month tads98 Shell Programming and Scripting 9 01-09-2009 12:52 PM
CRONTAB: Every second Tuesday of the month Cameron UNIX for Dummies Questions & Answers 2 06-02-2008 10:50 PM
Schedule to run every 3 minutes - CRONTAB prashanth_gs SUN Solaris 4 02-20-2007 07:52 AM
Crontab Job - Schedule prashanth_gs SUN Solaris 7 12-04-2006 05:03 AM
Cron to schedule 1st Wednesday of every Month?? bradtri Shell Programming and Scripting 5 10-20-2004 01:12 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-01-2008
paulds paulds is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 11
Arrow crontab schedule - first thursday of every month

Instead of the first five fields, one of eight special strings may appear:

string meaning
------ -------
@reboot Run once, at startup.
@yearly Run once a year, "0 0 1 1 *".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".

==================

so based on above


0 0 * 1-12 4 <<< this cron schedule will run at midnight each month on thursday? or will this trigger every thursday every month??
  #2 (permalink)  
Old 08-01-2008
paulds paulds is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 11
ok found the answer...


zazzybob
Registered Geek

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100

22 09 * 1-12 3 /easdwld/audit/dev/bin/purge.audit

That won't work - that'll run every wednesday. The OP wants the first wednesday of each month.

Cheers
ZB
  #3 (permalink)  
Old 08-01-2008
Dave Miller's Avatar
Dave Miller Dave Miller is offline
Registered User
  
 

Join Date: Dec 2007
Location: Northern NJ, USA
Posts: 151
cron is wierd in this one aspect. The day and date use an 'or' logic. So you can't set it up for first Thursday.

What you gotta do is run a script EVERY Thursday. The first line of the script checks if the date is 1-7. Or have the cron run it each day from 1-7, and have the script check for Thursday.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0