cron job does not work, why?
-
The interval of “debug60s” is 60 seconds.
if (!wp_next_scheduled('auto_update_sddl_event')) { // only for debug $file = fopen("c:/1.txt", "a"); fwrite($file, "0"); fclose($file); wp_schedule_event(current_time('timestamp'), 'debug60s', 'auto_update_sddl_event'); } function auto_update_sddl_func() { // only for debug $file = fopen("c:/1.txt", "a"); fwrite($file, "1"); fclose($file); } add_action('auto_update_sddl_event', 'auto_update_sddl_func');
I wish auto_update_sddl_func would execute every 60 seconds. However, it’s never run, not even once. In the file “C:/1.txt” I can only find “0”.
I’ve read codex but still have no idea at all. Can you help me? Thanks a looot!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘cron job does not work, why?’ is closed to new replies.