php - Real scheduler for wordpress plugins
I want to create a wordpress plugin that performs actions on certain minute intervals like X minutes.
Looking into the WP-API there's the methodwp_schedule_event
which can schedule actions hourly, daily or twice a day.
Is there a way to really schedule events in WP where I can define the exact minute the event should run?
Answer
Solution:
Try
YOUR_LINUX_TIMESTAMP is
time()
;Or look at full article: http://codex.wordpress.org/Function_Reference/wp_schedule_event
The only valid values are 'hourly', 'twicedaily', and 'daily'
BUT:
Open
cron.php
and find a code in "wp_includes/" folder and find:Add:
or hourly:
And change it as simple: