Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
If your scheduled tasks aren't working
amykhar
Join Date: Oct 2001
Posts: 4,438

PA
by amykhar amykhar is offline 21 Jul 2005

I have seen some problems over at vbulletin.com about some scheduled tasks not running. Here is one possible fix.

If you are running an upgraded board, go to your scheduled tasks manager. Remove any scheduled tasks that are not installed by jelsoft and were not installed with a 3.5 modification.

The default ones that come with vbulletin are:
Daily Digest
Subscriptions
Daily Statistics Log
Event Reminder
Thread Views 07-10-2005
Hourly Cleanup #1
Attachment Views
Restore Temporarily Banned Users
Hourly Cleanup
User Promotions
Weekly Digest
Happy Birthday Email

One 3.5 mod I know of that adds one is my Velocity Modification.

If you are a 3.5 mod author and have created a mod that has an updated scheduled task, please let me know and I shall add it to this list.
Views: 33226
Reply With Quote
Comments
  #2  
Old 21 Jul 2005, 23:02
Christine's Avatar
Christine Christine is offline
 
Join Date: Nov 2001
Real name: Christine. Really.
I don't have any added, but mine still aren't working.

I went through and saved each of them, which put them back to current 'next run time' but they didn't run as scheduled.

I wonder if there is a mismatch on the cron image vs what is being called? Haven't looked though.
__________________
L'chaim
Reply With Quote
  #3  
Old 21 Jul 2005, 23:11
tamarian tamarian is offline
 
Join Date: Oct 2001
vBouncer introduces 2 cron tasks, in 3.0.7 and in the 3.5 version.

vBouncer Clean
vBouncer Collect
Reply With Quote
  #4  
Old 22 Jul 2005, 06:55
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
If you have problems with cron jobs not running, the first you could try is reverting your footer template.
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #5  
Old 22 Jul 2005, 07:54
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
Did that. The scheduled task functions are running. The nextrun time is being updated and all that. It's just not running the actual code that it should run. BUT some tasks do work.
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
  #6  
Old 22 Jul 2005, 08:02
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Is this a 3.5 specific thing you are talking about? I do know that in 3.0 the cron handling got it's own strange things, for example in handling global variables.
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #7  
Old 22 Jul 2005, 13:39
tamarian tamarian is offline
 
Join Date: Oct 2001
Amy, the tasks that fail to run by cron, do they actually run from the scheculed task manager by clicking "run now"?
Reply With Quote
  #8  
Old 22 Jul 2005, 15:28
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
Yes. They do, Tamarian.
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
  #9  
Old 22 Jul 2005, 15:53
tamarian tamarian is offline
 
Join Date: Oct 2001
Originally Posted by amykhar
Yes. They do, Tamarian.
O.k. I think I've seen this before, the task runs from the rask manager, but fails to run as a cron.

Does the failed cron task file contain any function declaration(s)? If so, removing those functions and opting for a single block of code fixes this.
Reply With Quote
  #10  
Old 22 Jul 2005, 15:58
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
I had the same problem with my Thread of the Week hack for 3.0.7.

If you use a global variable inside a function, things work strange. Best to pass all used variables as parameters to the functions.
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #11  
Old 22 Jul 2005, 16:06
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
No functions and no global variables in this one. And, it worked no problem under 3.0.7. I simply updated it to use the correct 3.5 $db instead of $DB_site.

Plus, one of the jelsoft cron tasks doesn't seem to run either.

Amy
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
  #12  
Old 22 Jul 2005, 16:24
tamarian tamarian is offline
 
Join Date: Oct 2001
Originally Posted by amykhar
Plus, one of the jelsoft cron tasks doesn't seem to run either.
Which one? It may add an extra clue.

There is definitly something weird going on, and we know so far that it only occures as a cron, but works from the task manager.
Reply With Quote
  #13  
Old 22 Jul 2005, 16:29
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
The one that restores temporarily banned users. I have it set to log even if nobody is banned.
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
  #14  
Old 22 Jul 2005, 16:40
tamarian tamarian is offline
 
Join Date: Oct 2001
Originally Posted by amykhar
The one that restores temporarily banned users. I have it set to log even if nobody is banned.
For some reason, vB devs commented out the else part in that file. So it will not log anything, if nothing was done, regardless of the setting to log. You might want to uncomment that part (if you haven't done that), just to make sure if it is, or isn't, running.

Edit: it will also need " log_cron_action($logmessage, $nextitem);"

Last edited by tamarian; 22 Jul 2005 at 16:43.
Reply With Quote
  #15  
Old 22 Jul 2005, 16:44
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
I did That's how I set it to log even if it didn't ban anybody.
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
Reply



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

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


New To Site? Need Help?

All times are GMT. The time now is 09:12.

Layout Options | Width: Wide Color: