[wp-hackers] WordPress 2.1 Cron Examples
Lester Chan
gamerz84 at hotmail.com
Sun Jan 21 19:38:32 GMT 2007
Hi Guys,
I intending to use the inbuilt cron feature of wordpress 2.1 but i can't find any examples of it.
I tried the following code, but it will not work. Any ideas?
add_action('test', 'test');function test() { global $wpdb; $wpdb->query("INSERT INTO test VALUES(".current_time('timestamp').")");}//wp_clear_scheduled_hook('test');
if (!wp_next_scheduled('test')) { wp_schedule_event(time(), 'hourly', 'test');}Thanks =D
With Regards, Lester 'GaMerZ' Chanhttp://www.lesterchan.net
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
More information about the wp-hackers
mailing list