scheduled tasks not running at specified times

Started by GreenMotion, December 29, 2009, 10:11:56 AM

Previous topic - Next topic

GreenMotion

I have a task scheduled to run every 90 minutes which generates a daily topic based on an external RSS feed.

I noticed however that the time of the newly created daily topic is not at all consistent. Sometimes it posts at 01:30 (which is what I expect) and other times at completely random times. i.e. 3:04am, 5:57am etc.

How do scheduled tasks actually run? Does a scheduled task require activity on the forum to be ran? If so, how can I force it to be ran at that specific time? I tried setting up a cron-job running a wget against the index.php page of my forum, but that didn't seem to make a difference :(

   - GM -

Arantor

They run when someone visits the page and the system realises it hasn't been run.

Running it against wget wouldn't help unless you're telling it to get all the dependencies too - IIRC what happens is there's an image request goes out to ?action=autotask (I think) and when that fires, it figures out what it has to run.

I think if you were to call that directly you might have more luck but it's not something I've dug too deeply into.
Holder of controversial views, all of which my own.


H

The easiest thing to force it to run exactly at the right time would be to make a standalone script (include SSI.php, and then your own code) and then run it using cron
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Arantor

Holder of controversial views, all of which my own.


Advertisement: