View Full Version : Scheduled tasks not working
vinku
10-21-2013, 04:58 AM
Hi,
I have added scheduled tasks of my own that are not working.
I can run them manually and they work fine, but they are not running by themselves as they should.
I have set time interval of 10 mins by keeping all fields as * and the minute fields as 10, 20, 30, 40, 50, 59.
Whenever I go in edit and save that task again then only the 'next time' gets updated but still the task doesn't runs.
Any ideas?
I'm not using any plugins/add-on etc. Any help would be appreciated.
Thanking you in anticipation.
Lynne
10-22-2013, 03:01 AM
So you wrote your own php script for the cron job? Did you basically copy a script of a real cron job and just make your needed changes in order to create the task? If it isn't running as a Scheduled Task, then something is wrong on the code and it's impossible to tell without you posting your code.
Thunderbird8
10-24-2013, 05:25 AM
Does the "last run" time change at all? It sounds like the task system itself isn't functioning, which can be for a few reasons that I've seen in these forums.
First off, the footer template. Can you find these lines?
<!-- Do not remove cronimage or your scheduled tasks will cease to function -->
{vb:raw cronimage}
<!-- Do not remove cronimage or your scheduled tasks will cease to function -->
If not, there's your problem. It's located between the Powered by vBulletin and the copyright lines.
I remember seeing a thread either here or on vb.com by someone who started using a page caching service on their forum, which killed the scheduled tasks. The reason that happens is because the {vb:raw cronimage} generates a 1x1 image with a random number on the end. If this number isn't changing, the scheduled task system will think it was just a cached page being pulled, and won't run any tasks.
tbworld
10-24-2013, 06:21 AM
Just some general info to add to @Thunderbird8's input:
See ... /includes/class_bootstrap.php #397 (relative)
This is where $cronimage is defined. In using various external 'caching' methods, I have come across what @Thunderbird8 was referring to.
Since each external caching system works differently, exempting this from the cache can get a bit tricky and sometimes modification of this line of code is necessary.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.