If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Crontab

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-19-03, 15:59
RKD RKD is offline
Registered User
 
Join Date: Oct 2003
Posts: 2
Crontab

We want to schedule a crontab to run a script in sybase to update statistics the first saturday of every month.

What would the options be within crontab?
Reply With Quote
  #2 (permalink)  
Old 11-20-03, 07:45
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Crontab

Quote:
Originally posted by RKD
We want to schedule a crontab to run a script in sybase to update statistics the first saturday of every month.

What would the options be within crontab?
HI,

Test

0 0 1 * 1 command

Gustavo.
Reply With Quote
  #3 (permalink)  
Old 11-22-03, 15:49
igorigor igorigor is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
Re: Crontab

Quote:
Originally posted by RKD
We want to schedule a crontab to run a script in sybase to update statistics the first saturday of every month.

What would the options be within crontab?

crontab format is :
minute
hour
day of the month
month
day of the week


these are logical 'or', not 'and', unless you choose any (*)
So, setting day of month to 1-6 and day of week to Sat
does not select first Sat of the month but days 1 through 6 plus every Sat of a month.
What you want to do is create a script that checks the date
and executes conditionally, e.g. run the script days 1 through 6
of each month and within the script check the day of the week
Reply With Quote
  #4 (permalink)  
Old 11-22-03, 15:51
igorigor igorigor is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
Re: Crontab

Quote:
Originally posted by gurey
HI,

Test

0 0 1 * 1 command

Gustavo.
Clearly, this will run at midnight every 1st day and every
single Monday of every month
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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