Hello everyone,
on our config.yml file we have several jobs triggered by a cron job.
Example :
nightly-backup:
triggers:
- schedule:
cron: '0 0 * * *'
filters:
branches:
only:
- develop
jobs:
- backup-prod-db
This job (and others) has been working for many years but stopped 7d ago (although it was executed 5 days ago but not before and not since).
This happened concomitantly to switching our github repo to private, do you have any ideas why ?
Thank you !
Hmm, strange. Have all of the jobs stopped working? Or just the cron ones?
Hello, thank you for your response.
Only the cron ones. Other jobs, triggered by a push on a branch for example, are working correctly.
To perform some tests, I created 2 new cron on the branch cronjob-circle-test
test-cronjob:
triggers:
- schedule:
cron: '40 * * * *'
filters:
branches:
only:
- cronjob-circle-test
jobs:
- lint-commits
test-cronjob-backups:
triggers:
- schedule:
cron: '50 * * * *'
filters:
branches:
only:
- cronjob-circle-test
jobs:
- backup-prod-db
Since my push to this branch 4 hours ago, the workflow test-cronjob
was started only once about 1h ago and test-cronjob-backups
never did whereas they should have been triggered 4 times each.
To summarize results of my tests during a span of 18 hours:
- workflow
test-cronjob
was executed 7 times instead of 18
- workflow
test-cronjob-backups
was executed 3 times instead of 18
I suspect a queueing or a performance issue.
Thanks for the summary, I’ll take a look with the relevant team and get back to you.
1 Like
The team is still looking at it, but I wasn’t able to reproduce what you were seeing. Can you take a look at my config and let me know if anything looks glaringly different than your test?
https://app.circleci.com/pipelines/github/sebastian-lerner/ruby-testsplitting?branch=branch-show-up
version: 2.1
jobs:
test-cron:
docker:
- image: cimg/ruby:3.3.5
parallelism: 2
steps:
- run: echo "hello world"
- run: echo $CIRCLE_REPOSITORY_URL
- run: echo << pipeline.project.git_url >>
- run: echo "i'm a cron test"
workflows:
test-ruby:
triggers:
- schedule:
cron: '40 * * * *'
filters:
branches:
only:
- branch-show-up
jobs:
- test-cron
Also could you email me the CircleCI project ID for your test project please (in Project Settings). sebastian@circleci.com
Hello Sebastian, I sent you an email with our project id.
Regarding your config, yes this is basically what I did to perform my tests except parallelism setting and docker image :
executors:
blockframes-ci:
docker:
- image: blockframes/ci:demo-env-node-20
environment:
NODE_OPTIONS: '--max-old-space-size=8192'
PROJECT_ID: blockframes-ci
working_directory: ~/repo
resource_class: large
Yesterday I deactivated this option as our GitHub repo is no longer public
And I created a new test on this project. Every scheduled jobs was successfully executed so maybe it was linked to this or you guys fixed something but it looks like it is working ok now.
1 Like