Skip to content

Commit

Permalink
add setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
bbirney committed May 4, 2024
1 parent 688787b commit 0cc0879
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
3 changes: 0 additions & 3 deletions run_fetch.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/bash
set -a # Automatically export all variables
source .env
set +a # Stop automatically exporting
cd $PROBABLES_ROOT_DIR
#!/bin/bash
NOW=$(date +"%Y-%m-%d %H:%M:%S")
Expand Down
17 changes: 17 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Set up environment variables or necessary paths
set -a
source .env
set +a

# setup cronjob
# ┌───────────── min (0 - 59)
# │ ┌────────────── hour (0 - 23)
# │ │ ┌─────────────── day of month (1 - 31)
# │ │ │ ┌──────────────── month (1 - 12)
# │ │ │ │ ┌───────────────── day of week (0 - 7) (Sunday to Saturday; 7 is also Sunday)
# │ │ │ │ │
# │ │ │ │ │
SCRIPT_PATH="$PROBABLES_ROOT_DIR"run_fetch.sh
(crontab -l 2>/dev/null; echo "0,30 * * * * $SCRIPT_PATH") | crontab -

0 comments on commit 0cc0879

Please sign in to comment.