Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Duplicate
-
Affects Version/s: 4.2.6
-
Fix Version/s: Unscheduled
-
Component/s: CiviReport
-
Labels:
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
There need to be more / better options for scheduled jobs than Daily / Hourly / Every. It needs to be clear that it's only as to-the-minute as the underlying cron run, but we certainly need to be able to set longer frequencies. This becomes painfully obvious when setting up report emails and at best, you're just mailing someone incessantly once per day. (Or the user has to ask someone who understands cron to set up a separate cron job.)
The action is all in CRM/Core/ScheduledJob.php, so it'll be simple to implement, but I'm not sure what the best way to structure the field is. I'm leaning towards:
Every time
Hourly
Daily
Weekly
Monthly
Quarterly
Yearly
Then, add a new field for the day that can be set when the frequency is weekly, monthly, quarterly, or yearly. Weekly / 4, for example, would go off if it's Thursday and the job hasn't been run yet that day.
Not sure how to deal with Monthly / 31, however (or, for that matter, 29 or 30). Do we just fire everything on the last day of the month? The same goes for Quarterly / 92 and Yearly / 366.
I'll put this together soon unless someone has a better thought. I don't have ambition to do "2nd Friday" or anything like that unless people seem to want it.