Skip to content

Edit job interval after initialization #179

Discussion options

You must be logged in to vote

You would need to something like below:

// stop job
bree.stop(NAME);

// find the job in config array
const idx = bree.config.jobs.findIndex(j => j.name === NAME);

// set with new interval
bree.config.jobs[idx] = { ...bree.config.jobs[idx], interval: NEW_INTERVAL };

// restart job
bree.start(NAME);

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by federicoodorizzi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants