Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 06-09-2007, 02:26 PM
SDB SDB is offline
 
Join Date: Feb 2004
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 06-10-2007, 03:15 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this a vBulletin Scheduled Task or a Unix Cron?
Reply With Quote
  #3  
Old 06-10-2007, 04:43 AM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 06-10-2007, 07:41 AM
SDB SDB is offline
 
Join Date: Feb 2004
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #5  
Old 06-10-2007, 12:49 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 06-10-2007, 03:35 PM
SDB SDB is offline
 
Join Date: Feb 2004
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 06-10-2007, 10:17 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, glad you got it sorted out
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04006 seconds
  • Memory Usage 2,203KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete