Cron job for wekkly interval


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Cron job for wekkly interval
# 1  
Old 03-04-2009
Cron job for wekkly interval

Hi,
I would like to trigger a scipt on every Wednesday 12:00PM.
how can schedule this script in CRON command.



Could you please help me on this.
# 2  
Old 03-04-2009
'man crontab' yields the following:
Code:
  crontab Entry Format
     A crontab file consists of lines of  six  fields  each.  The
     fields  are  separated by spaces or tabs. The first five are
     integer patterns that specify the following:

     minute (0-59),
     hour (0-23),
     day of the month (1-31),
     month of the year (1-12),
     day of the week (0-6 with 0=Sunday).

     Each of these patterns may be either an  asterisk   (meaning
     all legal values) or a list of elements separated by commas.
     An element is either a number or two numbers separated by  a
     minus  sign  (meaning  an  inclusive range). Notice that the
     specification of days may be made by two fields (day of  the
     month and day of the week). Both are adhered to if specified
     as a list of elements. See EXAMPLES.

Given the above:
Code:
0 12 * * 4 myScript

# 3  
Old 03-04-2009
Your cron entry will be something like this:

Code:
0 12 * * 3 <scriptpath/scriptname>

0 = minutes (0-59)
12 = hour (0-23)
1st * = day of month (1-31)
2nd * = month (1-12)
3 = day of the week (0-6 where 0 = Sunday)

* denotes all values for that parameter will be used.

Hope that helps.
# 4  
Old 03-19-2009
0(min) 12(hrs) *(Day,1,31) *(month(1,12) 3(wed) pathof the script wer u ve stored > redirectting path
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

2. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

3. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

4. Shell Programming and Scripting

Multiple Interval cron issue with order of execution

55,0 5,6 * * * myScript This cron task will execute on 5:00AM, 5:55AM, 6:00AM and 6:55AM. Is there any possibility to make it run only in the order specified such as 5:55AM and 6:00AM (basically only on the 2 intervals) ? (1 Reply)
Discussion started by: vikram3.r
1 Replies

5. UNIX for Advanced & Expert Users

cron job

Hello, Can anyone help me how to set any script as cron job. I have gone through all threads but not able to get the details. Appreciate your help. I need to set test.pl to run on every Tuesday by 6am in the morning. I do not the cron file which is defined. Please help me out. ... (3 Replies)
Discussion started by: jam_prasanna
3 Replies

6. Shell Programming and Scripting

Selective input passing, for cron with multiple interval

0,0 4,5 11 11 * /pkgs/roots/scripts/job_monitor.ksh i have the requirement like, for the first time(4) the script should have the input parameter as "Value1" but the second time(5) it should have the input parameter as "Value2" Can we achieve this using any cron options ? If yes, How..??... (2 Replies)
Discussion started by: vikram3.r
2 Replies

7. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

8. AIX

Crontab job on sunday with two week interval

Hi experts, Please help me to set a backup script run at 6AM on Sunday every two week It means the 1st sunday, run script backup at 6AM the 2nd sunday, skip the 3rd sunday, run script backup at 6AM the 4nd sunday, skip ... so on Thank you so much (4 Replies)
Discussion started by: tan.pham
4 Replies

9. UNIX for Dummies Questions & Answers

CRON usage for CRON job

can anybody explain the usage of CRON for adding a cron job. please provide an example also for better understanding !!! Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

10. Shell Programming and Scripting

cron job

I believe that crob invokes command under bash. But most of our work are carried out using c shell. So what do I need to be aware of (or what precautions should I be taking) when I use cron. (1 Reply)
Discussion started by: sharanbr
1 Replies
Login or Register to Ask a Question