[PR #53] [MERGED] schedule on: today if at: time not passed #88

Closed
opened 2025-12-29 00:22:31 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/plashchynski/crono/pull/53
Author: @acolyer
Created: 11/6/2016
Status: Merged
Merged: 11/16/2016
Merged by: @plashchynski

Base: masterHead: same_day


📝 Commits (1)

  • 3f9ea83 schedule today if at: time not passed

📊 Changes

2 files changed (+11 additions, -0 deletions)

View changed files

📝 lib/crono/period.rb (+1 -0)
📝 spec/period_spec.rb (+10 -0)

📄 Description

I noticed with my weekly tasks where a time of day was specified (e.g. on: :sunday, at: '22:00') , and Crono was started on that day (e.g. Sunday), but before the schedule time (e.g. 21:00) that the job would be scheduled for one week later rather than the same day. With heroku restarts my jobs scheduled for later in the day never got to run!

See accompany test case (which fails without the fix) and the trivial fix.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/plashchynski/crono/pull/53 **Author:** [@acolyer](https://github.com/acolyer) **Created:** 11/6/2016 **Status:** ✅ Merged **Merged:** 11/16/2016 **Merged by:** [@plashchynski](https://github.com/plashchynski) **Base:** `master` ← **Head:** `same_day` --- ### 📝 Commits (1) - [`3f9ea83`](https://github.com/plashchynski/crono/commit/3f9ea8350d6262b56b51519b119ed1d3873e2e63) schedule today if at: time not passed ### 📊 Changes **2 files changed** (+11 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/crono/period.rb` (+1 -0) 📝 `spec/period_spec.rb` (+10 -0) </details> ### 📄 Description I noticed with my weekly tasks where a time of day was specified (e.g. on: :sunday, at: '22:00') , and Crono was started on that day (e.g. Sunday), but before the schedule time (e.g. 21:00) that the job would be scheduled for one week later rather than the same day. With heroku restarts my jobs scheduled for later in the day never got to run! See accompany test case (which fails without the fix) and the trivial fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 00:22:31 +01:00
adam closed this issue 2025-12-29 00:22:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/crono#88