You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% data reusables.actions.enterprise-github-hosted-runners %}
13
+
If you enable email or web notifications for {% data variables.product.prodname_actions %}, you'll receive a notification when any workflow runs that you've triggered have completed. The notification will include the workflow run's status (including successful, failed, neutral, and canceled runs). You can also choose to receive a notification only when a workflow run has failed. For more information about enabling or disabling notifications, see [AUTOTITLE](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications).
14
14
15
-
{% data reusables.repositories.workflow-notifications %}
15
+
Notifications for scheduled workflows are sent to the user who initially created the workflow.
16
+
* If a different user updates the cron syntax, in the `schedule` event in the workflow file, subsequent notifications will be sent to that user instead.
17
+
* If a scheduled workflow is disabled and then re-enabled, notifications will be sent to the user who re-enabled the workflow rather than the user who last modified the cron syntax.
18
+
19
+
You can also see the status of workflow runs on a repository's Actions tab. For more information, see [AUTOTITLE](/actions/managing-workflow-runs).
| Not applicable | Not applicable | Last commit on default branch | Default branch | When the scheduled workflow is set to run. A scheduled workflow uses [POSIX cron syntax](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). For more information, see [AUTOTITLE](/actions/using-workflows#triggering-a-workflow-with-events). |
969
+
| Not applicable | Not applicable | Last commit on default branch | Default branch |
970
970
971
971
> [!NOTE]
972
972
> * {% data reusables.actions.schedule-delay %}
973
-
> * This event will only trigger a workflow run if the workflow file is on the default branch.
973
+
> * {% data reusables.actions.branch-requirement %}
974
974
> * Scheduled workflows will only run on the default branch.
975
975
> * In a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days. For information on re-enabling a disabled workflow, see [AUTOTITLE](/enterprise-server/actions/using-workflows/disabling-and-enabling-a-workflow#enabling-a-workflow).
976
-
> * For an enterprise with {% data variables.product.prodname_emus %}, scheduled workflows will not run if the last `actor` associated with the scheduled workflow has been deprovisioned (and therefore become suspended) by the {% data variables.product.prodname_emu %} identity provider (IdP). However, if the last `actor` {% data variables.product.prodname_emu %} has not been deprovisioned by the IdP, and has only been removed as a member from a given organization in the enterprise, scheduled workflows will still run with that user set as the `actor`. Similarly, for an enterprise without {% data variables.product.prodname_emus %}, removing a user from an organization will not prevent scheduled workflows which had that user as their `actor` from running. Essentially, triggering a scheduled workflow requires that the status of the `actor` user account associated with the workflow is currently active (i.e. not suspended or deleted). Thus, the _user account's_ status, in both {% data variables.product.prodname_emu %} and non-{% data variables.product.prodname_emu %} scenarios, is what's important, _not_ the user's _membership status_ in the organization where the scheduled workflow is located.
977
-
> * Certain repository events change the `actor` associated with the workflow. For example, a user who changes the default branch of the repository, which changes the branch on which scheduled workflows run, becomes `actor` for those scheduled workflows.
978
-
> * For a deactivated scheduled workflow, if a user with `write` permissions to the repository makes a commit that changes the `cron` schedule on the workflow, the workflow will be reactivated, and that user will become the `actor` associated with any workflow runs. Note that, in this situation, the workflow is not reactivated by any change to the workflow file; you must alter the `cron` value in the workflow and commit this change.
979
-
>
980
-
> **Example:**
981
-
>
982
-
> ```yaml
983
-
> on:
984
-
> schedule:
985
-
> - cron: "15 4,5 * * *" # <=== Change this value
986
-
> ```
987
976
988
977
The `schedule` event allows you to trigger a workflow at a scheduled time.
989
978
990
-
{% data reusables.repositories.actions-scheduled-workflow-example %}
991
-
992
-
Cron syntax has five fields separated by a space, and each field represents a unit of time.
993
-
994
-
```text
995
-
┌───────────── minute (0 - 59)
996
-
│ ┌───────────── hour (0 - 23)
997
-
│ │ ┌───────────── day of the month (1 - 31)
998
-
│ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
999
-
│ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
1000
-
│ │ │ │ │
1001
-
│ │ │ │ │
1002
-
│ │ │ │ │
1003
-
* * * * *
1004
-
```
979
+
**Example:**
1005
980
1006
-
You can use these operators in any of the five fields:
981
+
```yaml
982
+
on:
983
+
schedule:
984
+
- cron: "15 4,5 * * *"
985
+
```
1007
986
1008
-
| Operator | Description | Example |
1009
-
| -------- | ----------- | ------- |
1010
-
| * | Any value | `15 * * * *` runs at every minute 15 of every hour of every day. |
1011
-
| , | Value list separator | `2,10 4,5 * * *` runs at minute 2 and 10 of the 4th and 5th hour of every day. |
1012
-
| - | Range of values | `30 4-6 * * *` runs at minute 30 of the 4th, 5th, and 6th hour. |
1013
-
| / | Step values | `20/15 * * * *` runs every 15 minutes starting from minute 20 through 59 (minutes 20, 35, and 50). |
987
+
{% data reusables.repositories.actions-scheduled-workflow-example %}
1014
988
1015
989
> [!NOTE]
1016
990
> {% data variables.product.prodname_actions %} does not support the non-standard syntax `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`, and `@reboot`.
1017
991
1018
992
You can use [crontab guru](https://crontab.guru/) to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of [crontab guru examples](https://crontab.guru/examples.html).
1019
993
1020
-
Notifications for scheduled workflows are sent to the user who last modified the cron syntax in the workflow file. For more information, see [AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs).
994
+
### `actor` for scheduled workflows
995
+
996
+
Certain repository events change the `actor` associated with the workflow. For example, a user who changes the default branch of the repository, which changes the branch on which scheduled workflows run, becomes `actor` for those scheduled workflows.
997
+
998
+
For a deactivated scheduled workflow, if a user with `write` permissions to the repository makes a commit that changes the `cron` schedule on the workflow, the workflow will be reactivated, and that user will become the `actor` associated with any workflow runs.
999
+
1000
+
Notifications for scheduled workflows are sent to the user who last modified the cron syntax in the workflow file. For more information, see [AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs).
1001
+
1002
+
> [!NOTE]
1003
+
> For an enterprise with {% data variables.product.prodname_emus %}, triggering a scheduled workflow requires that the status of the `actor` user account associated with the workflow is currently active (i.e. not suspended or deleted).
1004
+
> * Scheduled workflows will not run if the last `actor` associated with the scheduled workflow has been deprovisioned by the {% data variables.product.prodname_emu %} identity provider (IdP). However, if the last `actor` {% data variables.product.prodname_emu %} has not been deprovisioned by the IdP, and has only been removed as a member from a given organization in the enterprise, scheduled workflows will still run with that user set as the `actor`.
1005
+
> * Similarly, for an enterprise without {% data variables.product.prodname_emus %}, removing a user from an organization will not prevent scheduled workflows which had that user as their `actor` from running.
1006
+
> * Thus, the _user account's_ status, in both {% data variables.product.prodname_emu %} and non-{% data variables.product.prodname_emu %} scenarios, is what's important, _not_ the user's _membership status_ in the organization where the scheduled workflow is located.
Copy file name to clipboardExpand all lines: content/actions/tutorials/migrate-to-github-actions/manual-migrations/migrate-from-jenkins.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,8 @@ on:
126
126
- cron: '*/15 * * * 1-5'
127
127
```
128
128
129
+
For more information about `schedule` events and accepted cron syntax, see [AUTOTITLE](/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule).
130
+
129
131
### Configuring environment variables in a pipeline
130
132
131
133
#### Jenkins pipeline with an environment variable
Copy file name to clipboardExpand all lines: content/actions/tutorials/use-actions-runner-controller/deploy-runner-scale-sets.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -249,7 +249,7 @@ ARC supports using anonymous or authenticated proxies. If you use authenticated
249
249
The `maxRunners` and `minRunners` properties provide you with a range of options to customize your ARC setup.
250
250
251
251
> [!NOTE]
252
-
> ARC does not support scheduled maximum and minimum configurations. You can use a cronjob or any other scheduling solution to update the configuration on a schedule.
252
+
> ARC does not support scheduled maximum and minimum configurations. You can use a cron job or any other scheduling solution to update the configuration on a schedule.
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,10 +103,10 @@ For more information about using `on:pull_request:paths-ignore` and `on:pull_req
103
103
104
104
### Scanning on a schedule
105
105
106
-
If you use the default {% data variables.code-scanning.codeql_workflow %}, the workflow will scan the code in your repository once a week, in addition to the scans triggered by events. To adjust this schedule, edit the `cron` value in the workflow. For more information, see [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onschedule).
106
+
If you use the default {% data variables.code-scanning.codeql_workflow %}, the workflow will scan the code in your repository once a week, in addition to the scans triggered by events. To adjust this schedule, edit the `cron` value for the `on.schedule` event in the workflow. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-syntax#onschedule).
107
107
108
108
> [!NOTE]
109
-
> {% data variables.product.prodname_dotcom %} only runs scheduled jobs that are in workflows on the default branch. Changing the schedule in a workflow on any other branch has no effect until you merge the branch into the default branch.
Copy file name to clipboardExpand all lines: content/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ There are a couple of customization options you can implement to optimize {% dat
27
27
28
28
## Controlling the frequency and timings of dependency updates
29
29
30
-
{% data variables.product.prodname_dependabot %} runs its checks for version updates at a frequency set by you in the configuration file, where the required field, `schedule.interval`, must be set to `daily`, `weekly`, `monthly`, `quarterly`, `semiannually`, `yearly`, or `cron` (see [cronjob](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#cronjob)).
30
+
{% data variables.product.prodname_dependabot %} runs its checks for version updates at a frequency set by you in the configuration file, where the required field, `schedule.interval`, must be set to `daily`, `weekly`, `monthly`, `quarterly`, `semiannually`, `yearly`, or `cron` (see [`cronjob`](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#cronjob)).
31
31
32
32
By default, {% data variables.product.prodname_dependabot %} balances its workload by assigning a random time to check and raise pull requests for dependency updates.
Copy file name to clipboardExpand all lines: data/reusables/repositories/actions-scheduled-workflow-example.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,23 @@
1
-
You can schedule a workflow to run at specific UTC times using [POSIX cron syntax](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes.
1
+
Use [POSIX cron syntax](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07) to schedule workflows to run at specific UTC times. Scheduled workflows run on the latest commit on the default branch. The shortest interval you can run scheduled workflows is once every 5 minutes.
2
2
3
-
This example triggers the workflow every day at 5:30 and 17:30 UTC:
3
+
{% data reusables.repositories.cron %}
4
4
5
-
```yaml
6
-
on:
7
-
schedule:
8
-
# * is a special character in YAML so you have to quote this string
9
-
- cron: '30 5,17 * * *'
10
-
```
5
+
You can use these operators in any of the five fields:
6
+
7
+
| Operator | Description | Example |
8
+
| -------- | ----------- | ------- |
9
+
| * | Any value |`15 * * * *` runs at every minute 15 of every hour of every day. |
10
+
| , | Value list separator |`2,10 4,5 * * *` runs at minute 2 and 10 of the 4th and 5th hour of every day. |
11
+
| - | Range of values |`30 4-6 * * *` runs at minute 30 of the 4th, 5th, and 6th hour. |
12
+
| / | Step values |`20/15 * * * *` runs every 15 minutes starting from minute 20 through 59 (minutes 20, 35, and 50). |
11
13
12
-
A single workflow can be triggered by multiple `schedule` events. You can access the schedule event that triggered the workflow through the `github.event.schedule` context. This example triggers the workflow to run at 5:30 UTC every Monday-Thursday, but skips the `Not on Monday or Wednesday` step on Monday and Wednesday.
14
+
A single workflow can be triggered by multiple `schedule` events. Access the `schedule` event that triggered the workflow through the `github.event.schedule` context. This example triggers the workflow to run at 5:30 UTC every Monday-Thursday, and 17:30 UTC on Tuesdays and Thursdays, but skips the `Not on Monday or Wednesday` step on Monday and Wednesday.
0 commit comments