Log in

View Full Version : Scheduled Tasks Not Working


burlesque
08-18-2007, 01:17 PM
My scheduled tasks have all stopped running automatically. They all still work if they are triggered manually by the 'run now' command though.

I've just checked the cron jobs on my server and I can't find anything relating to vbulletin. Is it possible that I've deleted the cron job by mistake which is causing this problem?

If so, could somebody please give me instructions on how to easily restore this.

Thanks in advance.

Marco van Herwaarden
08-18-2007, 01:22 PM
Please start by ensuring that your footer template still contains the code needed to run Scheduled Tasks.

burlesque
08-18-2007, 02:19 PM
My footer code is as follows:

<script type="text/javascript">
<!--
var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
var utcOffset = new Date().getTimezoneOffset() / 60;
if (Math.abs(tzOffset + utcOffset) == 1)
{ // Dst offset is 1 so its changed
document.forms.dstform.submit();
}
//-->
</script>
<!-- / auto DST correction code -->

</if>
<script type="text/javascript">
<!--
// Main vBulletin Javascript Initialization
vBulletin_init();
//-->
</script>

Marco van Herwaarden
08-18-2007, 05:14 PM
It should at least contain:
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
$cronimage
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->

PS Unless you have purchased the Branding Free option, you are also missing the copyright.

puroeuro
08-25-2008, 09:15 AM
It should at least contain:
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
$cronimage
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->



when i put this code into the footer template around where it used to be by looking at the history of the template it caused my forum page to go blank white. only the main page was able to be accessed and the acp, which luckily i was able to get to the acp to edit the template again and delete it out of there. i'm assuming there is a specific place that it needs to be placed for it to work correctly? we have a custom footer template which is much more coding then what's posted above. if need be i can post it.

Marco van Herwaarden
08-25-2008, 09:33 AM
Then you will need to post your current footer template.

puroeuro
08-25-2008, 12:52 PM
<br >
<div align="center">
<if condition="$show['quickchooser']">
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="$vbphrase[quick_style_chooser]">
$quickchooserbits
</optgroup>
</select>
</if>
<if condition="$show['languagechooser']">
<select name="langid" onchange="switch_id(this, 'lang')">
<optgroup label="$vbphrase[quick_language_chooser]">
$languagechooserbits
</optgroup>
</select>
</if>
</div>
<br >
$spacer_close
<!-- /content area table -->

<if condition="$show['dst_correction']">
<!-- auto DST correction code -->
<form action="profile.php" method="post" name="dstform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="dst" />
</form>
<script type="text/javascript">
<!--
var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
var utcOffset = new Date().getTimezoneOffset() / 60;
if (Math.abs(tzOffset + utcOffset) == 1)
{ // Dst offset is 1 so its changed
document.forms.dstform.submit();
}
//-->
</script>
<!-- / auto DST correction code -->
</if>
<script type="text/javascript">
<!--
// Main vBulletin Javascript Initialization
vBulletin_init();
//-->
</script>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="19" background="$stylevar[imgdir_misc]/footer_time_tablebg.gif"><table width="80" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="$stylevar[imgdir_misc]/footer_time_left.gif" alt="" width="32" height="19"></td>
<td nowrap background="$stylevar[imgdir_misc]/footer_time_bg.gif" style="height: 19px;"><strong><font color="#FFFFFF" size="1" face="Tahoma">$vbphrase[all_times_are_gmt_x_time_now_is_y]</font></strong></td>
<td><img src="$stylevar[imgdir_misc]/footer_time_right.gif" alt="" width="32" height="19"></td>
</tr>
</table></td>
</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="42" align="left"><img src="$stylevar[imgdir_misc]/footer_designedby_left.gif" alt="" width="42" height="29"></td>
<td background="$stylevar[imgdir_misc]/footer_designedby_bg.gif" style="width: 100%;"><div align="center"><a href="http://www.vbskinworks.com" target="_blank"><img src="$stylevar[imgdir_misc]/footer_vbskinworks.gif" alt="Style By: vBSkinworks" width="234" height="29" border="0"></a></div></td>
<td width="42" align="right"><img src="$stylevar[imgdir_misc]/footer_designedby_right.gif" alt="" width="42" height="29"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="$stylevar[imgdir_misc]/footer_bottom_teal.gif" class="headlinks"><div align="left"><img src="$stylevar[imgdir_misc]/footer_bottom_teal.gif" width="8" height="41">

<td class="headlinks" background="$stylevar[imgdir_misc]/footer_bottom_teal.gif"><a href="http://www.vbulletin.com" target="_blank">$vbphrase[powered_by_vbulletin]</a> </td>
<td background="$stylevar[imgdir_misc]/footer_bottom_teal.gif" class="headlinks"><div align="right">


<strong>
<if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow">$vbphrase[contact_us]</a> -</if>
<a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -
<if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]" style="color: #CA0000;">$vbphrase[admin]</a> -</if>
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]" style="color: #39DD39;">$vbphrase[mod]</a> -</if>
<if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
<if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> -</if>
<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
</strong>

&nbsp;&nbsp;</div></td>
</tr>
</table>
</td>
<td width="0" style="width:0;overflow:hidden;" valign="top" background="$stylevar[imgdir_misc]/border_right_bg.gif"></td>
</tr>
</table>

MoT3rror
08-26-2008, 04:31 AM
All the $cronimage is a img tag when there is a schedule task that needs to happen. It best to put it near or the end of the footer template.

puroeuro
08-26-2008, 11:31 AM
i think i put it around the <if condition="$show['dst_correction']">
part. so about where should i put it within the code that's listed?

after this?
<strong>
<if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow">$vbphrase[contact_us]</a> -</if>
<a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -
<if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]" style="color: #CA0000;">$vbphrase[admin]</a> -</if>
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]" style="color: #39DD39;">$vbphrase[mod]</a> -</if>
<if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
<if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> -</if>
<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
</strong>

&nbsp;&nbsp;</div></td>

Lynne
08-26-2008, 02:11 PM
If you go to edit your template and hit View History, you may then compare your current template to the default vbulletin template. The screen that comes up will show you where you should be putting the $cronimage code.

puroeuro
08-26-2008, 06:08 PM
i tried that the first time, and ended up with a blank page when the forums where accessed, so i took it out and the forums are back working again. i just think it was in the wrong place in the template, it was right near dst_correction code on the other template so i added it back to there and that's when it stopped allowing anyone to access the forum. i've just been manually running the tasks for the last 6 months, and just now started to dig into why it's been doing it.

Lynne
08-26-2008, 07:56 PM
Perhaps post the template with your added in $cronimage code and we can see what you did wrong. Mine is right around the copyright notice, which I don't see in yours, and within the same form that the copyright notice is contained in. I'm not sure if it has to be within that form, but it might be a good idea to try. Do you have the copyright notice shown in another template? Perhaps that would be a good place to add it.

puroeuro
08-26-2008, 09:57 PM
to be honest i'm just the other half of the admin team and i'm not that great with the stuff, just trying to help out and get something done about stuff not working. the copyright is in there "Powered by vBulletin? Version 3.6.8
Copyright ?2000 - 2008, Jelsoft Enterprises Ltd. (http://www.vbulletin.com/)" which is where <td class="headlinks" background="$stylevar[imgdir_misc]/footer_bottom_teal.gif"><a href="http://www.vbulletin.com" target="_blank">$vbphrase[powered_by_vbulletin]</a> </td>
<td background="$stylevar[imgdir_misc]/footer_bottom_teal.gif" class="headlinks"><div align="right">
comes into the code i think.

Lynne
08-26-2008, 10:24 PM
Ah ha! It's all in one line in the code, so I missed it. This is what is in my footer template around there. Take a look at your template and you should be able to add it also (probably add it in the same td tag since it's something that never actually gets printed on the site - hopefully it doesn't bring your site down this time!):


<div align="center">
<div class="smallfont" align="center">
<!-- Do not remove this copyright notice -->
$vbphrase[powered_by_vbulletin]
<!-- Do not remove this copyright notice -->
</div>

<div class="smallfont" align="center">
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
$cronimage
<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->

$vboptions[copyrighttext]
</div>
</div>

puroeuro
08-27-2008, 01:02 AM
only one way to find out, i'll just have to test it to see. i didn't write/add any of the coding for the template, i just know where to find them in the acp. i've got some other small template issues as well with alignments of the "what's going on box" but that's another day.