Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Cronjob - on the half hour every half hour

  • 05-04-2013 04:17PM
    #1
    Registered Users, Registered Users 2, Paid Member Posts: 17,144 ✭✭✭✭


    hi folks

    I need to find out how to run a cron from 3:30am to 5pm every half hour.

    Is this correct?

    30, 3-17 * * */space/TEST/batch/bin/Schedule.sh >> /space/TEST/batch/bin/Schedule.sh

    Tried a quick google but still not sure

    thanks again!
    Trilla


Comments

  • Registered Users, Registered Users 2 Posts: 21,277 ✭✭✭✭Eoin


    I think it would be something like:
    0,30 3-17 * * * /space/TEST/batch/bin/Schedule.sh

    My UNIX is a bit rusty, but will the last part not try to output the results of the script to the script itself?


  • Registered Users, Registered Users 2 Posts: 1,127 ✭✭✭smcelhinney


    Yep, the redirect to the script will "append" the output of the script to itself.

    If you NEED to redirect, and dont care about the output, you could redirect to the bit-bucket (/dev/null). Explanation here.
    0,30, 3-17 * * * /space/TEST/batch/bin/Schedule.sh > /dev/null 2>&1
    


Advertisement