#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    5
    Rep Power
    0

    cron job! pls help!


    hi,

    i have several cron jobs to run. How do i install a master cron to control all those slave crons? That is to say, the master cron should start the next cron job immediately after a cron job has finished. Pls help!!!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    With a simple script that starts them one after the other...
    Like:
    Code:
    /etc/crontab:
    0 0 0 * 0 root /root/bin/allcron.sh
    Code:
    /root/bin/allcron.sh:
    #!/bin/sh
    /path1/job1
    /path2/job2
    /path3/job3
    ...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    5
    Rep Power
    0

    Cron Job - Pls Help


    Thanks for your help.

    Now if the first cron is hang, how can i ask the master cron to stop the slave cron and start the next cron?

    thanks
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    if you want to do advanced scripting, read the bash manual or learn PERL...

IMN logo majestic logo threadwatch logo seochat tools logo