forestav commited on
Commit
09c8c4b
·
1 Parent(s): d4c49af

fix cron job issue

Browse files
Files changed (1) hide show
  1. .github/workflows/actions.yml +3 -2
.github/workflows/actions.yml CHANGED
@@ -1,7 +1,7 @@
1
  name: Update Job Database
2
  on:
3
  schedule:
4
- - cron: "0 0 * * *" # Daily at midnight (main.py)
5
  - cron: "0 0 * * 0" # Weekly on Sunday at midnight (training_pipeline.ipynb)
6
  workflow_dispatch: # Allows manual triggering
7
 
@@ -11,6 +11,7 @@ permissions:
11
  jobs:
12
  daily-update:
13
  runs-on: ubuntu-latest
 
14
  steps:
15
  - name: Checkout repository
16
  uses: actions/checkout@v3
@@ -55,7 +56,7 @@ jobs:
55
 
56
  weekly-training:
57
  runs-on: ubuntu-latest
58
- #if: github.event.schedule == '0 0 * * 0' # Only run on weekly schedule
59
  steps:
60
  - name: Checkout repository
61
  uses: actions/checkout@v3
 
1
  name: Update Job Database
2
  on:
3
  schedule:
4
+ - cron: "0 0 * * 1-6" # Daily at midnight (Monday through Saturday) (main.py)
5
  - cron: "0 0 * * 0" # Weekly on Sunday at midnight (training_pipeline.ipynb)
6
  workflow_dispatch: # Allows manual triggering
7
 
 
11
  jobs:
12
  daily-update:
13
  runs-on: ubuntu-latest
14
+ if: github.event.schedule != '0 0 * * 0' # Skip on Sunday
15
  steps:
16
  - name: Checkout repository
17
  uses: actions/checkout@v3
 
56
 
57
  weekly-training:
58
  runs-on: ubuntu-latest
59
+ if: github.event.schedule == '0 0 * * 0' # Only run on Sunday
60
  steps:
61
  - name: Checkout repository
62
  uses: actions/checkout@v3