Find the answer to your Linux question:
Results 1 to 3 of 3
Hey, I have 4 jobs that i want to run as specific times. This is my crontab -e as follows. Code: 1 * * * * /var/www/html/scripts/dailyrepgen.sh */5 * * ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    Crontab job only half works??

    Hey,

    I have 4 jobs that i want to run as specific times.
    This is my crontab -e as follows.

    Code:
    1 * * * * /var/www/html/scripts/dailyrepgen.sh
    */5 * * * * /var/www/html/scripts/currentrepgen.sh
    0 8 * * * /var/www/html/scripts/emailreport.sh
    2 * * * * /var/www/html/scripts/archive.sh
    Basically what happens is that all the jobs execute and work fine other than the emailreport.sh

    There all in the same directory and they all have the same permissions. I'm not sure why this one wont run. If i manually run it - it works fine so it's no a script problem.

    I have the same setup on another identical machine and it runs perfectly.

    Any ideas - would be awesome.

    Cheers

  2. #2
    Just Joined!
    Join Date
    Oct 2007
    Location
    Pennsylvania
    Posts
    31
    Sounds like a cron environment problem to me. Compare the /etc/crontab config on the box that work to the /etc/crontab config on the box that doesn't work. Keep an eye on the top of the config for any environment settings.

    Bitstreamer

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2
    Ok i figured it out!

    I was calling a sendEmail perl script . .

    the sendEmail was in /usr/local/bin

    the crontab would not run the sendEmail command from there via the crontab

    moving it to /bin/ fixed the problem.

    Strange that you can run it manually and it works fine.

    Obviously a path issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...