Page MenuHomePhabricator

[toolforge,jobs,docs] Document how to force a rerun of a scheduled cron (just restart)
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):
Allow toolforge job run command to take a job name for any job that has already been scheduled, and run it.

For instance, if you have previously run toolforge jobs run mycronjob --command ./daily.sh -e ~/tfj/logs/daily.log -o ~/tfj/logs/daily.log --image tf-python37 --schedule "@daily", allow running toolforge jobs run mycronjob to execute the job as specified above (e.g., using the tf-python37 image, and logging output and errors to ~/tfj/logs/daily.log in this example).

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Sometimes scheduled jobs go wrong, and you want to rerun them as a one off after making some changes to your code to make sure your fix actually worked, or to replicate the error along with more specific logs.

Benefits (why should this be implemented?):
Makes manual runs of scheduled jobs easy.

Event Timeline

toolforge jobs restart already does this, although that is not documented at the moment.

dcaro renamed this task from Facilitate one-off execution of scheduled jobs to [toolforge,jobs,docs] Document how to force a rerun of a scheduled cron (just restart).Feb 21 2024, 4:30 PM
dcaro claimed this task.
dcaro triaged this task as Low priority.
dcaro subscribed.

Just updated the docs (was easy enough): https://wikitech.wikimedia.org/wiki/Help:Toolforge/Jobs_framework#Creating_scheduled_jobs_%28cron_jobs%29

Please reopen if that is not enough :)