diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 8f54162427..5310e86d8a 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -6,10 +6,21 @@ Todo Todo -## Caveat +## Caveats & Notes -The one-off scripts will error out on actions performed by repository admins, for example: +### The one-off scripts will error out on actions performed by repository admins, for example: -> If an admin removes a label from a Pull request, the script can not add that label back. This is usually because the script is acting on behalf of a non-admin user with write access. -> -> This is usually the case with the use of access tokens for scripts. +If an admin removes a label from a Pull request, the script can not add that label back. This is usually because the script is acting on behalf of a non-admin user with write access. + +This is usually the case with the use of access tokens for scripts. + +### Setting up Cron jobs for Sweeper Scripts + +For updating the pr correlation dataset we use PM2 like so: + +``` +pm2 start --no-autorestart sweeper/one-off-scripts/get-pr-relations-data.js --cron "*/10 * * * *" +``` + +This will start the script in the "no restart" mode and re-run it every 15 minutes. +Some useful links to calcuate a Cron expression: