The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cron job question dannyd Linux 5 03-03-2008 11:40 AM
cron question moe2266 Shell Programming and Scripting 4 11-19-2007 02:08 AM
cron question moe2266 Shell Programming and Scripting 4 08-20-2007 04:09 PM
question about cron hcclnoodles UNIX for Dummies Questions & Answers 1 12-08-2006 09:02 AM
cron question ted Shell Programming and Scripting 2 08-02-2004 05:13 AM

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 01-17-2006
DenD DenD is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 5
CRON Question

Could someone please tell me how I might specify in cron that I want a job to run only on the "last saturday" of the month?

Thanks.
  #2 (permalink)  
Old 01-17-2006
kduffin's Avatar
kduffin kduffin is offline Forum Advisor  
UN1X
  
 

Join Date: Nov 2003
Location: Maryland
Posts: 449
Not sure that is possible. It would be simpler to schedule the job for every saturday and have the script figure out whether it is the last saturday and whether to run or not. There are canned examples on the net such as:

for i in `cal | awk '{print $6}'`; do
if [ "x" != "x"$i ]; then
day=$i
fi
done

today=`date | awk '{print $3}'`

if [ $day = $today ]; then
'do want you want ...'
fi
exit


There are much more robust scheduling tools out there that can manage scheduled jobs from one point accross your enterprise.

It is also discussed in these forums here.

Cheers,

Keith
  #3 (permalink)  
Old 01-17-2006
DenD DenD is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 5
Thanks. I'll check it out.
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:34 AM.


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