[BUG in 1.21.4] Actions don't trigger on schedule:cron

Hey guys

For some reason my Gitea Actions don’t trigger on schedule: cron.
My Gitea version is 1.21.4 which should support this. Runner are at v0.2.6.

on:
  schedule:
    - cron: '*/5 * * * *'

jobs:
  backup:
    runs-on: ubuntu-amd64
    steps:
      - run: echo "Hello vom Test :)"

With “on: [push]” it works as expected. Did I forget to enable some option/feature?

docker-compose.yaml

version: "3.8"

networks:

  nginx-proxy:
    external:
      name: nginx-proxy

services:

  gitea:
    image: gitea/gitea:1
    container_name: gitea-server
    restart: always
    volumes:
      - /mnt/docker/gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    networks:
      - nginx-proxy
    expose:
      - "3000"
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - DISABLE_SSH=true
      - ROOT_URL=https://gitea.........
      - DOMAIN=gitea..........
      - VIRTUAL_HOST=gitea..........
      - VIRTUAL_PORT=3000

  runner:
    image: gitea/act_runner
    container_name: gitea-runner
    restart: always
    depends_on:
      - gitea
    volumes:
      - /mnt/docker/gitea/runner/config.yaml:/config.yaml
      - /mnt/docker/gitea/runner/data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - nginx-proxy
    environment:
      CONFIG_FILE: /config.yaml
      GITEA_INSTANCE_URL: "https://gitea.........."
      GITEA_RUNNER_REGISTRATION_TOKEN: "........."
      GITEA_RUNNER_NAME: "docker.........."
      GITEA_RUNNER_LABELS: "ubuntu-amd64:docker://catthehacker/ubuntu:act-latest"

So, I downgraded to 1.21.3 and the scheduled Actions are working again. Looks like there’s a bug in 1.21.4!?

Could someone confirm that please?

I can confirm that the cron triggers in v1.21.4 do not work. I have not tried it in v1.21.3, but it definitely does not work in the current version.

1 Like

I was interested in this and did a downgrade to v1.21.3 as a test. But the cron triggers didn’t work there either. The normal push triggers worked perfectly. Then i pushed a new commit to the repo and the cron triggers suddenly started to work (in v1.21.3). I did an upgrade to v1.21.4 and the cron triggers still worked. But only until I made a new commit. Then the cron triggers stopped working again (in v1.21.4).

So there is definitely something wrong with v1.21.4. I don’t really know the code base well enough, but it seems to trigger something internally on a new commit, which is responsible for the cron actions. As long as there is no update here, it will continue to work in v1.21.4. It only stops with a new commit.

I think at this point we should probably open an issue on Github too. Do you want to do that? After all, you discovered it. I don’t want to “steal” that from you. Otherwise I can do that too.

Feel free to open an issue. You made all the tests and probably you have more details :slight_smile:
Thanks a lot!

I can confirm the problem too. @p7k open an issue, please :slight_smile:

This will be fixed in v1.21.5

3 Likes