vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Scheduled tasks not working (https://vborg.vbsupport.ru/showthread.php?t=303653)

vinku 10-21-2013 04:58 AM

Scheduled tasks not working
 
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.


All times are GMT. The time now is 06:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02984 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete