How to setup a crontab to execute at specific time

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

Answers


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.


Need Your Help

Best way to set environment-specific variables in rails

ruby-on-rails ruby environment-variables development-environment production-environment

There are certain variables I would like to have in the development environment, and certain variables for the production environment. For example, in production mode, I might want to use a cache to

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.