aboutsummaryrefslogtreecommitdiff
path: root/content/notes/2023-05-27-cronjobs-github-with-actions.md
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-03-10 14:59:14 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-03-10 14:59:14 +0100
commit1100562e29f6476448b656dbddd4cf22505523f6 (patch)
tree442eec492199104bd49dfd74474ce89ade8fcac9 /content/notes/2023-05-27-cronjobs-github-with-actions.md
parenta40d80be378e46a6c490e1b99b0d8f4acd968503 (diff)
downloadmitjafelicijan.com-1100562e29f6476448b656dbddd4cf22505523f6.tar.gz
Move back to JBMAFP
Diffstat (limited to 'content/notes/2023-05-27-cronjobs-github-with-actions.md')
-rw-r--r--content/notes/2023-05-27-cronjobs-github-with-actions.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/content/notes/2023-05-27-cronjobs-github-with-actions.md b/content/notes/2023-05-27-cronjobs-github-with-actions.md
new file mode 100644
index 0000000..8d44761
--- /dev/null
+++ b/content/notes/2023-05-27-cronjobs-github-with-actions.md
@@ -0,0 +1,32 @@
1---
2title: "Cronjobs on Github with Github Actions"
3url: /cronjobs-github-with-actions.html
4date: 2023-05-27T00:35:36+02:00
5type: note
6draft: false
7---
8
9In the root of your repository create a folder `.github/workflows` and in that
10folder create a file a file `cron.yaml`. This file can be named whatever you
11wish. But it has to be a `yaml` file.
12
13File below (`.github/workflows/cron.yaml`) describes an action that will trigger
14every six hours and it will curl example.com.
15
16However. Be sure that you have enough credits. Free account is not that generous
17with the minutes they give you for free. Check more about GitHub Actions usage
18on their website https://docs.github.com/en/actions.
19
20```yaml
21# .github/workflows/cron.yaml
22name: Do a curl every 6 hours
23on:
24 schedule:
25 - cron: '0 */6 * * *'
26jobs:
27 cron:
28 runs-on: ubuntu-latest
29 steps:
30 - name: Call some url
31 run: curl 'https://example.com'
32```