Download & Extend

weekly hook not being triggered

Project:CronPlus
Version:5.x-1.0
Component:Code
Category:bug report
Priority:critical
Assigned:syscrusher
Status:closed (fixed)

Issue Summary

I tested this a fair bit on devel server but now that my module that uses crionplus has moved to our production server for some reason the weekly hook is never fired.

in watchdog i can see the dailies and the hourlies but after a month, no weeklies.

I have also checked the date for cronplus_weekly_last and it is a month ago.

very odd.. will continue to dig.

Comments

#1

Status:active» needs review

Yup, there is a bug in the module where it figures out current weekday - bracket in wrong place.

current code has: $now_wkdy = intval(gmdate('w'), $now);

and it should be: $now_wkdy = intval(gmdate('w', $now));

when i was doing my testing i had "day of week" to run on as the default (like most people; which i guess is why this hasn't been discovered??). The default is Sunday or day 0 and since the bad bracket placement causes it to always resolve to 0 that would still work.

When moving to production i changed this to Thursday.. and therefore it is never hit

hopefully this can get committed soon.

Peter Lindstrom
LiquidCMS - Content Management Solution Experts

#2

ooops.. and the patch

AttachmentSize
cronplus-now_weekday.patch 637 bytes

#3

Priority:normal» critical
Assigned to:Anonymous» syscrusher
Status:needs review» reviewed & tested by the community

Bingo -- That is indeed a bug, and your patch does indeed seem to fix it.

I'll get this committed over the coming weekend. Thanks very much for the bug report and patch!

Scott (Syscrusher)

#4

sweet.. thanks.. cool module btw.

#5

Status:reviewed & tested by the community» fixed

#6

Patch is committed to current released versions.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.