Page MenuHomePhabricator

Scheduler on Toolforge is broken
Closed, InvalidPublicBUG REPORT

Description

Scheduler for my tool-acc (/iluvatarbot) is not working properly.

  • Simple Python-script for test purpose:
import time
print(str(int(time.time())))  # timestamp to console / log.out

jobs.yaml, every 6 hours:

- name: metrtest
command: pyvenv/bin/python ./pyBot/wikipedia/metr-test.py
image: python3.11
schedule: "* */6 * * *"
emails: none

Expected result after ~17 h (16:40-9:40 UTC): 2 lines.
Real result: 120 lines (pastebin).

Event Timeline

taavi subscribed.

The scheduler is working correctly. The first item in "* */6 * * *" is the minute - you have specified a star which means that it's going to run the job every minute when the rest of the conditions (namely the current hour being divisible by six) matches. To make it run once every six hours, change the first star to be some number between 0 and 59.