GitHub shows a list of historical runs for a specific deployment in order. Some of these Actions could have been triggered from a scheduled run, with cron. But we do not know when the next scheduled run is going to be.
We could add an information bar here on the top if there is going to be a scheduled job for that Action and when.

This feature request is similar to what Travis shows in their cron job settings, like "Scheduled in 20 hours from now".

This can be computed based on the last _scheduled_ run of an Action added with the schedule values for that Action.
Example: https://github.com/notlmn/copy-as-markdown/actions?query=workflow%3ADeployment
GitHub Actions needs so much work still...
This suggestion sounds good, maybe we can display it here:

But... we need an API for this, we can't load a YAML parser. Best case scenario GitHub lets us read configs as JSON (?) so we only need a lightweight cronjob parser module
I tried a bit but couldn't find an API for that, the closest I could find was listing workflows and details of a workflow.
But these are v3, couldn't find anything related to actions or workflows in v4.
/cc @lukehefson
Impossible for the time being due to:
/-\scron:\s+['"](.+)['"]/)✅ The YAML regex would be enough to extract it.
💡 The crontab parser doesn't have to be huge. I found a 11KB implementation but it'd have to be reverse-engineered: crontab-parser.zip
💡 The crontab parser doesn't have to be huge. I found a 11KB implementation but it'd have to be reverse-engineered: crontab-parser.zip
This sounds like an interesting exercise, I'll try my hand at it.
If you do send a PR, make sure to drop all unrelated code, like warnings and such. We only need to know when the next run is.
Published https://www.npmjs.com/package/@cheap-glitch/mi-cron if you want to use it for this issue. I wish I could help more with this but I know zilch about Github Actions.
Thank you!
To fix this issue, there's little to know about GH Actions, it just needs to:
cron line with regex: /-\scron:\s+['"](.+)['"]/)relative-time element to display it on the sidebar of https://github.com/sindresorhus/refined-github/actions, as shown in my mockup:
Thanks @fregante for the detailed break up!
Do you have any example(s) of similar feature(s) that can help me get started on this?
@cheap-glitch which part do you need help with.
If you ask me start with a dummy cron (dont fetch the yaml) and then we can work on getting the yaml
If you ask me start with a dummy cron (dont fetch the yaml) and then we can work on getting the yaml
The last time I worked on this, if I remember it right, we'll have to fetch all yaml files in .github/workflows and compare them with entries (of action names) on the actions page, would probably require caching too.
Good point. If the filenames aren’t available in the sidebar, then the regex will also have to parse name:
If you ask me start with a dummy cron (dont fetch the yaml) and then we can work on getting the yaml
That was the plan, as I think the fetching part is what's gonna give me the most trouble.
Turns out this wasn't as hard as I thought it'd be.
Most helpful comment
Published https://www.npmjs.com/package/@cheap-glitch/mi-cron if you want to use it for this issue. I wish I could help more with this but I know zilch about Github Actions.