简体   繁体   English

为什么我的 github 操作的 cron 不工作?

[英]Why my github action's cron is not working?

I have written a github actions workflow yml file to schedule a job to run everyday at a particular time but it's not working.我已经编写了一个 github 操作工作流 yml 文件来安排一个作业在每天的特定时间运行,但它不起作用。 I have even used the cron written in official doc but still it is not working.我什至使用了官方文档中编写的 cron,但仍然无法正常工作。 Is it due to Indian TimeZone or some other reason??是由于印度时区还是其他原因?

name: run app.py

on:
  schedule:
    - cron: '30 4,17 * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        
      - name: setup python
        uses: actions/setup-python@v4
        with:
          python-version: '3.9' # install the python version needed
          
      - name: install python packages
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          
      - name: execute py script # run main.py
        env:
          DSA_SHEET: ${{ secrets.DSA_SHEET }}
        run: python app.py

I have tried to change the cron many time but it was not working.我曾多次尝试更改 cron,但它没有用。 It was only working when set to run every 5mins but when I set it to run everyday it is not working.它仅在设置为每 5 分钟运行一次时才有效,但是当我将其设置为每天运行时它不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM