How to setup a crontab to execute at specific time *

Question

How can i set up my crontab to execute X script at 11:59PM every day without emailing me or creating any logs?

Right now my crontab looks something like this

@daily /path/to/script.sh

Answer

When you do crontab -e, try this:

59 23 * * * /usr/sbin/myscript > /dev/null

That means: At 59 Minutes and 23 Hours on every day (*) on every month on every weekday, execute myscript.

See man crontab for some more info and examples.

< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/3136/" >How to setup a crontab to execute at specific time< /a>
Share on Google Plus

About Cinema Guy

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment