I want to use the 'daily' argument in wp_schedule_event() function. when scheduled to run once a day, at what time does it run? Does it depend on your server clock or uses GMT?
Can we specify an hour at which the 'daily' argument should run?
I want to use the 'daily' argument in wp_schedule_event() function. when scheduled to run once a day, at what time does it run? Does it depend on your server clock or uses GMT?
Can we specify an hour at which the 'daily' argument should run?
You can specify when the daily argument should run by using something other than 'time()' for the $timestamp value. For example, if you wanted to schedule an event to run at noon each day you could use mktime(12,0,0,date('m'),date('d'),date('Y')) as your $timestamp value - it should fire based on your server clock. It will fire daily starting at the $timestamp you give.
Hope that helps.
Thanks.
This topic has been closed to new replies.