Scheduling a script by using Crontab


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Scheduling a script by using Crontab
# 1  
Old 09-22-2010
Scheduling a script by using Crontab

Hi,

I need to schedule a script in crontab which should run at 01:00 am in the morning and should run for every 15 days in a month.

How to schedule this by using crontab?

Many thanks.

Rgds,
# 2  
Old 09-22-2010
I believe most crontabs would accept:
Code:
0 1 1-15 * * /path/to/script

This would run on the first 15 days of a given month at 1am.
(I presume this is correct - your definition of "every 15 days a month" is slightly ambiguous)
# 3  
Old 09-22-2010
Thanks citaylor!!!

I mean to ask the script should run once in a fortnight( twice in a month ) at 1am.

Rgds,
# 4  
Old 09-22-2010
Code:
0 1 1,15 * * /path/to/script

This will run on day 1 and day 15 of the month
# 5  
Old 09-23-2010
thanks citaylor
# 6  
Old 02-16-2011
HI Citaylor,

Path/to/script means exat how it works .i am new to cron....

I tried lot of times but it doesnt working

i tried 0 1 * * * /home/cnu/pgm.sh..
------------
but it was showing 0 :command not found...
The underline should me problem seems...pwd is /home/cnu...

Many Thnaks In Advance
Sree Vasu
# 7  
Old 02-16-2011
what's the output, can you see the file under /home/cnu?

Code:
ls -l /home/cnu/pgm.sh

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Scheduling a script

Hi, I have my script in below path in UNIX /storage/sas_source/SDTM-Development/FileWatcher/filewatcher.sh I want to schedule it to run every 30 secs. Please let me know the steps to do it. Thanks. (7 Replies)
Discussion started by: prats_7678
7 Replies

2. Shell Programming and Scripting

Crontab Scheduling

I want to schedule a job as - Every Weekday at 12:30 PM and 9 PM in a single line. How can i do that (2 Replies)
Discussion started by: varlax
2 Replies

3. UNIX for Dummies Questions & Answers

[Solved] crontab scheduling

Hi, We can schedule a new job using crontab -e. is there any other way to achieve the same(opening the file directly and add an entry). I have tried to access /var/spool/crontabs directory. But i am getting permission denied error, Please help me. Thanks (8 Replies)
Discussion started by: pandeesh
8 Replies

4. Shell Programming and Scripting

Scheduling a Ksh script

All, Running the below script independently is working fine with no issue but once I am scheduling it in cron on my Linux environment it is not working. Can anyone look into this and let me know what I have to modify here to schedule it properly. 09 03 * * 4 ksh 'cd... (1 Reply)
Discussion started by: Oracle_User
1 Replies

5. Shell Programming and Scripting

Crontab scheduling

Hi all, My OS is Solaris 10. I want to schedule a job which i need to run between morining 6 to eve 6 once for every 2 hours. This is what i did. 0 6-18 * * 1-5 /monitor.sh It runs for every hour how to make it for every two hours ...... Thanks, Firestar. (1 Reply)
Discussion started by: firestar
1 Replies

6. UNIX for Advanced & Expert Users

Scheduling a script other than crontab

Hi, How can we run/schedule a shell script. Since there is no access to cron at this point of time we have to think other way out to run a script every hour. How can we achieve this. Need advice. How about using sleep,autosys etc...the script should trigger off every hour...which sends... (3 Replies)
Discussion started by: noorm
3 Replies

7. Shell Programming and Scripting

Shell script for scheduling

Hi guys, I am new guy for unix. I need help writing the following shell script. My requirement is: I have few pl/sql procedures(lets say 10). I want to run some of them (say 5) parallally in the background and once these are completed trigger the next ones one after other. Could some one... (13 Replies)
Discussion started by: chanduhyd4u
13 Replies

8. Shell Programming and Scripting

Scheduling crontab using parameter from XML file

Hi, I need to write script which will read a value from XML file and schedule crontab accordingly. I have an XML file which has a key value structure where the entries is: <Param Name="executionInterval" Value="600" /> 600 means that the crontab should be scheduled to run every 600 sec. ... (0 Replies)
Discussion started by: michaelbz
0 Replies

9. Shell Programming and Scripting

script scheduling

Hi, I have a ksh scrip (x) that scans a directory and does actions when a file arrives in this directory. My question is what is the best way to schedule x? 1. Use cron tab and create a task running forever 2. Creat another ksh script (y) that runs (x) in a non-terminating loop Which... (2 Replies)
Discussion started by: GNMIKE
2 Replies

10. Shell Programming and Scripting

scheduling script to run another script on Solaris

Hi everyone, I am trying to automate one process on Solaris OS. This is what happens at the moment. Every night at 19:30 and every hour after that we run a script that checks the status of databases. That script runs and prints if db's are OK at the end it states how many were down. I am... (3 Replies)
Discussion started by: andrei
3 Replies
Login or Register to Ask a Question