Linux Schedule Cron All In One

Linux Schedule Cron All In One

定時任務 / 定時器

GitHub Actions

Scheduled events

Cron syntax has five fields separated by a space, and each field represents a unit of time.

┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of the month (1 - 31)
│ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
│ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
│ │ │ │ │                                   
│ │ │ │ │
│ │ │ │ │
* * * * *

https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#schedule

on:
  schedule:
    # * is a special character in YAML so you have to quote this string
    # This example triggers the workflow every 15 minutes
    - cron:  '*/15 * * * *'

https://github.com/xgqfrms/gitHub-secrets-all-in-one/blob/main/.github/workflows/auto_commit.yml

on:
  schedule:
    # * is a special character in YAML so you have to quote this string
    # This example triggers the workflow every 15 minutes
    - cron:  '8 8 * * *'

https://github.com/learning-js-by-reading-source-codes/vanillawebprojects/blob/main/.github/workflows/schedule.yml

每晚的 21:30 重啓

# 每晚的 21:30 重啓smb
30 21 * * * /etc/init.d/smb restart

https://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/crontab.html#smb

refs




©xgqfrms 2012-2020

www.cnblogs.com 發佈文章使用:只允許註冊用戶纔可以訪問!


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章