weekly hook not being triggered
liquidcms - June 26, 2008 - 15:20
| Project: | CronPlus |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | syscrusher |
| Status: | patch (reviewed & tested by the community) |
Description
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.

#1
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
#3
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.