Setting up More than One Cron Job


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Setting up More than One Cron Job
# 1  
Old 12-01-2008
Setting up More than One Cron Job

Hello,
it is possible to setup two cron jobs to run at different frequencies?
I have a cron job which runs from monday -friday every 5 mins .I also want to have one more cron job which runs on a sunday..

It it possible to have?

Thanks
# 2  
Old 12-01-2008
yes... It is possible
# 3  
Old 12-01-2008
Quote:
Originally Posted by iamgeethuj
yes... It is possible
Thanks..How do i do it..when I say 'crontab -e' it always brings up my first cronjob related file.How do i set up the 2nd cronjob and where?
# 4  
Old 12-01-2008
Add it to a new line?
# 5  
Old 12-01-2008
In SCO, where I play, it would be a matter of adding a line in the crontab file.
They are stored at /usr/spool/cron/crontabs and are editable files with the time requirements at the beginning of the line and the program to run at the end of the line.
Once the file is edited cron needs to be restarted to get the current jobs loaded into the system.
On the systems I administer, the root crontab file generally has 12 or more added jobs, some which are global and some which are run on specific days and times.
Since there should be a root crontab you should be able to locate them with a find command.
# 6  
Old 12-01-2008
Try like:

Code:
0-59/5 * * * 1-5 script1.sh
00 00 * * 0 script2.sh

 
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. UNIX for Dummies Questions & Answers

Setting up cron

Hi, The client wants to set up cronjob for trigger alerts to be sent between the hours of 6 AM PST and 12 AM PST . Could you please help me the command to setup cron. scriptname :- triggeralert.ksh Thanks in advance (16 Replies)
Discussion started by: kirankumar
16 Replies

4. 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

5. UNIX for Dummies Questions & Answers

Need help setting up a CRON job

Okay I am not the best at UNIX, so please excuse this if it is a complete ID 10-T error (look at that for a moment...) Logging in via telnet to the server, I want to create a cron job to run various "canned reports" in SAS on a regular basis. No problem, I have the directories, .profile... (14 Replies)
Discussion started by: RussellNonBrand
14 Replies

6. 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

7. Shell Programming and Scripting

setting a cron job

Greetings i am a newbie to this so kindly bear with me. I have a script to get weather information from a site and save that into a database. wget Cranfield Weather Forecast temp = $(cat wx.php | grep -o "Temperature.......") rm wx.php mysql -D "weather_wise" -e "insert into weather... (6 Replies)
Discussion started by: tererez
6 Replies

8. 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

9. Shell Programming and Scripting

cron job setting

hi all I had one script which i had put in /home/name/xxx.sh directory. I want to put it in cron job list means this script must be run on each day at morning 9 am. Kindly reply me all necessary change with exact path detail. Means where i had to do changes. Thanks in adavance. ... (2 Replies)
Discussion started by: jaydeep_sadaria
2 Replies

10. UNIX for Dummies Questions & Answers

setting up cron job for month end week report

Hi all, Needs your help in scheduling a cron job for the below mentioned requirement. Just let me know if anybody has a similar job running as mentioned below: Month end reports - Report of all items created in a parent table that were created during the week. Presently this report runs... (3 Replies)
Discussion started by: Bhups
3 Replies
Login or Register to Ask a Question