thegreenwebfoundation / thegreenwebfoundation/developer-docs
Add docs for using the grid-intensity-go CLI to changed a cronjob from running regularly at say 6pm, an instead make it find a time between 4 and 9pm, and optimise for lowest grid intensity
@mrchrisadams is already working on this.
Since Jan 29, 2025.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
This was asked in the climateAction.tech slack, and I realised it's fairly doable with the grid intensity CLI, using something as simple as cron, an some lateral thinking:
Hi, is it possible to schedule the usage of GCP infrastructure when the energy mix in the region is cleanest? I have been having a look but haven't found too much. Context: I have a job I want to run on a regular cadence (e.g. once every 24 hours) but it doesn't need to be exact ie there could be a 6 hour window. The job will be computationally expensive (ML model re-training). A couple of things I have thought about already:
Schedule job when I know the demand on the grid is low ie overnight
Make use of any shared infra that exists so sharing the same underlying hardware at the expense of longer computation times
Any thoughts/advice appreciated!
Describe the solution you'd like
A clear and concise description of what you want to happen.
Is should be possible to do this with regular old cron, or anything that can run the same code a few times a day
You'd need:
- a way to check the current / expected co2 intensity
- a deadline by which the job has to be run
- a way to tell if the job has been run already
- a way to decide to go ahead with a job, and or either abort early
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
TODO - there are definitely tools that do this already
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.