Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 09 Jun 2007, 15:26
SDB SDB is offline
 
Join Date: Feb 2004
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 10 Jun 2007, 04:15
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Is this a vBulletin Scheduled Task or a Unix Cron?
__________________
View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #3  
Old 10 Jun 2007, 05:43
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
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?
__________________
Please feel free to PM me about custom work, installations, and upgrades!

Eclipse Records - Streetcult Street Team
Reply With Quote
  #4  
Old 10 Jun 2007, 08:41
SDB SDB is offline
 
Join Date: Feb 2004
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 10 Jun 2007, 13:49
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
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.
__________________
Please feel free to PM me about custom work, installations, and upgrades!

Eclipse Records - Streetcult Street Team
Reply With Quote
  #6  
Old 10 Jun 2007, 16:35
SDB SDB is offline
 
Join Date: Feb 2004
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 10 Jun 2007, 23:17
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
ok, glad you got it sorted out
__________________
Please feel free to PM me about custom work, installations, and upgrades!

Eclipse Records - Streetcult Street Team
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 11:28.

Layout Options | Width: Wide Color: