Moving Cron Jobs Across various Machines


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Moving Cron Jobs Across various Machines
# 1  
Old 12-10-2008
Moving Cron Jobs Across various Machines

How do I migrate this crontab of mine across various environments?
My colleague says it has to be manually typed into various unix boxes.Can't we have a cronjob script/file that we can install or place in a certain path so that we can eliminate manual typing of crontab entries for every machine?

Thanks
V
# 2  
Old 12-10-2008
How about something like this:

Code:
crontab -l > some_file

Then copy the file to your other systems.


Edit: Try a google search as to where the crontab file is on whichever system you are using.
# 3  
Old 12-10-2008
Little tip.

If you have EDITOR (or VISUAL) set to "vi" when you execute "crontab -e", you can use the ex style ":r" command to read lines into your crontab.
To insert a text file into your crontab:

:r filename


Just save the new cron lines into a file, copy them to each server, then insert them in your "crontab -e" editing session.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Cron jobs and at jobs

There are two jobs in Solaris , Cron and at jobs.. I know how to disable or enable cron jobs. How can I enable at jobs and disable it. Kindly help. Rj (2 Replies)
Discussion started by: jegaraman
2 Replies

2. Shell Programming and Scripting

cron jobs

Hi, please help on this am trying to exec the below mentioned cron jobs but its getting failed fro the past two days ###but when am trying to execte the cron by the times 23,29 18 * * * /export/home/inrvgo/thelak/China.sh its getting exec properly please help on this #... (8 Replies)
Discussion started by: thelakbe
8 Replies

3. Shell Programming and Scripting

Help with cron jobs

Hi Frenz, How do we get a cron job running in background to foreground ? (3 Replies)
Discussion started by: mkalase
3 Replies

4. Solaris

cron jobs

how to Put a cron entry which should be same script triggered on every Saturday and 1st of every month at 01.00 GMT. 0 2 1 * 6 --( At 2.00 GMT every sat & on 1st of every month) the above syntax is correct? Thanks (1 Reply)
Discussion started by: kurva
1 Replies

5. UNIX for Advanced & Expert Users

cron jobs...

I need to start a job every friday night at 8:00 P.M , it runs all the day on Sat and Sun....can somebody tell me how to do this...I understand crontab...but haven't used it.........can u write some steps.....how to create a file and call.....I honestly dont know? Plz help.Thanks (2 Replies)
Discussion started by: RubinPat
2 Replies

6. HP-UX

Cron jobs

i am new for cronjobs can someone please tell me what logic is behind these RED Numbers and stars below? --> crontab -l 00 1 * * * /home/scripts/TarprodContent > /tmp/MprodBkup.log 2>&1 00 1 * * * /home/scripts/TarTprodContent > /tmp/TprodBkup.log 2>&1 00 1 * * *... (5 Replies)
Discussion started by: ajadaun
5 Replies

7. Solaris

Cron Jobs

I'm trying to run cron jobs to start any inhibited processes after a system reboot. I can schedule th cron, but i'm confused as to how to incorporated the reboot, since reboot is scheduled at different times, once every month. How can I write this to start every 15 min after after a reboot ... (2 Replies)
Discussion started by: Remi
2 Replies

8. Solaris

Cron Jobs

whats up, Have some questions about cron jobs, I am fairly new to the unix os. My cronjob sends all output to my mail, does anyone know how to redirect output to come out on the screen??? Thanks...... (6 Replies)
Discussion started by: lewisoco
6 Replies

9. Shell Programming and Scripting

cron jobs

hi folks, I need an explanation on cron jobs with an example (4 Replies)
Discussion started by: vijaysabari
4 Replies

10. UNIX for Dummies Questions & Answers

CRON Jobs

Hi, I am a total newbie to all things Unix. I've worked out I need to set up something that will allow me to automatically backup a DB for me, the DB is for a foum system I run. Now, I've only found out I need to use telnet for this, and worked out hwo to log into telnet today. From here... (4 Replies)
Discussion started by: eludlow
4 Replies
Login or Register to Ask a Question