Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to executing cron one minute after midnight every day?

Tags:

unix

cron

crontab

I want to execute cron every day on midnight at time 00:01 Hrs. Is the following cron time correct?

1 0 * * * *
like image 437
Nishant Avatar asked Oct 05 '15 11:10

Nishant


2 Answers

Yes the cron time is correct.

1 0 * * * /mydir/myscript 

should be your cron entry.

Each cron entry consists of six fields, in the following order:

minute(s) hour(s) day(s) month(s) weekday(s) command(s)
 0-59      0-23    1-31    1-12     0-6
like image 54
Natarajan Chidhambharam Avatar answered Oct 05 '22 06:10

Natarajan Chidhambharam


1 0 * * * /mydir/myscript <-- Correct 1 minute after midnight

1 0 * * * * <--- Incorrect, Syntax Error

like image 40
A. Smith Avatar answered Oct 05 '22 07:10

A. Smith