vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Some (most) cron jobs not running? (https://vborg.vbsupport.ru/showthread.php?t=149294)

SDB 06-09-2007 02:26 PM

Some (most) cron jobs not running?
 
Hi

I've just written a cron job which writes a html file once a minute.

It funs fine from "run now" button, and shows correctly in the list for the next time its due to run, but doesn't actually run on its own.

On noticing this, I've checked the logs and it appears that lots of my crons (note, not crons written by me - this is my first) are not running, although some are running fine.

Any helps would be appreciated.

Simon

Dismounted 06-10-2007 03:15 AM

Is this a vBulletin Scheduled Task or a Unix Cron?

Antivirus 06-10-2007 04:43 AM

Cron jobs in vbulletin aren't "true" cron jobs in the sense that they must be initiated by a pageload in your forums which contains the cron.gif image. Most every page contains thiw within the footer template. Is it possible that your forum isn't busy enough (very few page requests) which mght cause cron.gif to not be called?

try changing the time for one of your cron jobs to 5 minutes ahead, then wait 10 minutes and check your cronlog. If it doesn't show as having run, then go to your forums and refresh the main page or threadvier (whatever) then wait another couple minutes and check your cronlog again. Did it run now?

SDB 06-10-2007 07:41 AM

Sorry, scheduled task.

Hi Antivirus

Thanks for your post. Yes, the forum is busy enough (approx 500 users online).

Now. Interestingly, it has started to work this morning. I *believe* the resolution came with me changing some paths in the php file.

Does the file run from a different directory location when you click "Run Now" compared to when it runs automatically?

It also may be that the other "crons" are running, but not logging and I've just assumed that because this one wasn't running, the others weren't. Sorry, this could have just been me being a thicko! :)

Antivirus 06-10-2007 12:49 PM

correct, when you click run now, it calls the scheduled task (cron file) as opposed to the cron.gif image calling the scheduled task. Perhaps you customized your footer template and the cron image is no longer there? Check your footer template in AdminCP->StyleManager and see if you're using the default template or a customized one.

SDB 06-10-2007 03:35 PM

Hi

I would have thought that if the cronimage.gif wasn't displaying properly, then none of the scheduled tasks woudl run?

It does appear to be working now anyway, and the resolution seemed to be putting changing the code in my scheduled task php script from :

'/includes/flatfile.html'

to

DIR . '/includes/fliatfile.html'

Cheers, and thanks for everyone's replies.

Simon

Antivirus 06-10-2007 10:17 PM

ok, glad you got it sorted out


All times are GMT. The time now is 03:15 PM.

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.00935 seconds
  • Memory Usage 1,715KB
  • 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
  • (7)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