I have a Github Actions workflow that is triggered every hour, on the hour.
While the workflow does run, it does not run at the time it is scheduled i.e. it does not run on the hour. There is a delay which may be of more than 30 minutes. I don't know why this is.
It is not the workflow itself because it executes when I manually run it in approximately 30 seconds.
Can someone please tell me what is causing the delay?
Is it a time-zone issue? Even so, there should be a fixed interval of 1 hour between two consecutive workflow runs which is not the case.
This is the code.
# This is a basic workflow to help you get started with Actions
name: Email every hour
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 */1 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Set up Python environment
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Run script to send email
- name: Run script
run: python emailer.py
env:
EMAIL_USER: ${{ secrets.EMAIL_USER }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
TO_EMAIL: ${{ secrets.TO_EMAIL }}