Alex Rivera | Logout

How do I set up cron to run a file just once at a specific time?

Asked 2011-03-29T14:01:56.693
88

How do I set up cron to run a file just once at a specific time? One of the alternatives is at but it is not accessible to all users on standard hosting plans. Therefore I was wondering whether there is way to do it using cron?

Edit
Report

1 Answer

47

Try this out to execute a command on 30th March 2011 at midnight:

0 0 30 3 ? 2011  /command

WARNING: As noted in comments, the year column is not supported in standard/default implementations of cron. Please refer to TomOnTime answer below, for a proper way to run a script at a specific time in the future in standard implementations of cron.

answered 2011-03-29T14:06:40.380

Your Answer