-1

I have a cron job that is set to run at midnight. I would like to know if this is midnight from the server timezone or is it as soon as i create the cron job i have to wait 24h until it's being executed?

1 Answers1

0

You don't have to wait 24 hours. The cron in launched in the scheduled hour based on server's time.

jherran
  • 3,337
  • 8
  • 37
  • 54
  • What if I chose it to execute every 12 hour? Will it be 12 hours from midnight or how will the 12 hour execute work? – spurrenirre Nov 03 '14 at 21:03
  • You have to tell the cron at what hours your want to execute (min, hour, day/month, month and day/week). If you say 0 0/12 * * * the task will be executed at 0:00 and 12:00. – jherran Nov 03 '14 at 21:06