[GH-ISSUE #6] Unable to create/edit website with Cron monitoring enabled #4

Closed
opened 2026-02-27 09:12:32 +03:00 by kerem · 8 comments
Owner

Originally created by @srichter on GitHub (Oct 4, 2019).
Original GitHub issue: https://github.com/maelstrom-cms/odin/issues/6

WebsiteController checks for a field cron_keyword when validating the request in the store/update methods, but the text input's actual name is cron_key. Opening PR.

Originally created by @srichter on GitHub (Oct 4, 2019). Original GitHub issue: https://github.com/maelstrom-cms/odin/issues/6 `WebsiteController` checks for a field `cron_keyword` when validating the request in the store/update methods, but the text input's actual name is `cron_key`. Opening PR.
kerem closed this issue 2026-02-27 09:12:32 +03:00
Author
Owner

@OwenMelbz commented on GitHub (Oct 4, 2019):

Hey thanks for this, I think I got lazy and rush changed some things via github directly (including this). Proves shouldn’t rush otherwise you’ll just screw up 😂

<!-- gh-comment-id:538582719 --> @OwenMelbz commented on GitHub (Oct 4, 2019): Hey thanks for this, I think I got lazy and rush changed some things via github directly (including this). Proves shouldn’t rush otherwise you’ll just screw up 😂
Author
Owner

@srichter commented on GitHub (Oct 4, 2019):

No worries! Another issue I've noticed is that the displayed cron ping URLs are invalid when creating a site, as the site doesn't have an id yet. Might not make sense to show the URLs there.

I plan to implement notifications if crons are not pinged within a defined timeframe; would you be interested in a PR for that?

<!-- gh-comment-id:538583662 --> @srichter commented on GitHub (Oct 4, 2019): No worries! Another issue I've noticed is that the displayed cron ping URLs are invalid when creating a site, as the site doesn't have an id yet. Might not make sense to show the URLs there. I plan to implement notifications if crons are not pinged within a defined timeframe; would you be interested in a PR for that?
Author
Owner

@OwenMelbz commented on GitHub (Oct 4, 2019):

Good catch :) that was the last thing I added quickly as we had some cron issues.

Regarding notifications - this is something I’d be interested in, however it would need to be something really simple, currently it works well because you can add an extra payload to help identify each scheduled task. However if we start adding defined timeframes you’d need to be able to assign each rule to different scheduled tasks, which then adds a complexity.

Have you got any ideas how to keep it super simple both at UI and implementation level to support multiple jobs?

<!-- gh-comment-id:538586574 --> @OwenMelbz commented on GitHub (Oct 4, 2019): Good catch :) that was the last thing I added quickly as we had some cron issues. Regarding notifications - this is something I’d be interested in, however it would need to be something really simple, currently it works well because you can add an extra payload to help identify each scheduled task. However if we start adding defined timeframes you’d need to be able to assign each rule to different scheduled tasks, which then adds a complexity. Have you got any ideas how to keep it super simple both at UI and implementation level to support multiple jobs?
Author
Owner

@srichter commented on GitHub (Oct 4, 2019):

My initial ideas would be:

  • Define a single timeframe per website, which would only allow for rudimentary monitoring that any tasks are firing/completing.

  • Define the timeframe in each ping and use the last ping of that tasks's timeframe for determining when the next should occur

<!-- gh-comment-id:538590684 --> @srichter commented on GitHub (Oct 4, 2019): My initial ideas would be: - Define a single timeframe per website, which would only allow for rudimentary monitoring that _any_ tasks are firing/completing. - Define the timeframe in each ping and use the last ping of that tasks's timeframe for determining when the next should occur
Author
Owner

@OwenMelbz commented on GitHub (Oct 5, 2019):

So if you needed to make sure a scheduled task runs every minute, how would you define that in the UI?

<!-- gh-comment-id:538627709 --> @OwenMelbz commented on GitHub (Oct 5, 2019): So if you needed to make sure a scheduled task runs every minute, how would you define that in the UI?
Author
Owner

@srichter commented on GitHub (Oct 5, 2019):

For the first option I'd just have another input to define the timeframe.

For the second option I'd use and explain in the UI a URL parameter such as nextping and the scheduled checker task would look through the past cron pings for ones containing that key in their payload and check to see if any of them are late. The tricky part would be determining how far back the checker looks to identify unique pings (maybe combine it with the first option to define the longest timeframe?).

<!-- gh-comment-id:538674111 --> @srichter commented on GitHub (Oct 5, 2019): For the first option I'd just have another input to define the timeframe. For the second option I'd use and explain in the UI a URL parameter such as `nextping` and the scheduled checker task would look through the past cron pings for ones containing that key in their payload and check to see if any of them are late. The tricky part would be determining how far back the checker looks to identify unique pings (maybe combine it with the first option to define the longest timeframe?).
Author
Owner

@OwenMelbz commented on GitHub (Oct 6, 2019):

I think i'd more likely accept a PR that uses the query string method, that way the feature is 100% opt-in and allows the ability from the word go to support multiple jobs.

The reason I say this is because primarily this is a tool that my company use, and our priority is that it works for us, anything that we introduce we'll have to maintain for the next X years within business hours, so we need to make sure it aligns with our goals.

So if you can solve it using query strings, then 👍🏽

<!-- gh-comment-id:538732178 --> @OwenMelbz commented on GitHub (Oct 6, 2019): I think i'd more likely accept a PR that uses the query string method, that way the feature is 100% opt-in and allows the ability from the word go to support multiple jobs. The reason I say this is because primarily this is a tool that my company use, and our priority is that it works for us, anything that we introduce we'll have to maintain for the next X years within business hours, so we need to make sure it aligns with our goals. So if you can solve it using query strings, then 👍🏽
Author
Owner

@srichter commented on GitHub (Oct 7, 2019):

Sounds good. I'll see how I end up implementing it for my own use and then open a PR and we can go from there.

<!-- gh-comment-id:539101627 --> @srichter commented on GitHub (Oct 7, 2019): Sounds good. I'll see how I end up implementing it for my own use and then open a PR and we can go from there.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/odin-maelstrom-cms#4
No description provided.