Skip to content

Commit

Permalink
Changes to the cronjob script
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jan 28, 2025
1 parent ec6378a commit f1cfaa4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/cronjob.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/bin/sh

# Exit on error
set -e

SDSSCORE_APO_TOO=$SDSSCORE_DIR/apo/too_targets
SDSSCORE_LCO_TOO=$SDSSCORE_DIR/lco/too_targets
SDSS_ID_DIFFS_PATH=/uufs/chpc.utah.edu/common/home/sdss50/sdsswork/sandbox/sdss_id/too_diffs

TOO_TARGET_FILES=/uufs/chpc.utah.edu/common/home/sdss50/sdsswork/mos/too/targets

TOO_DBUSER=sdss
TOO_DBHOST=operations.sdss.org
TOO_DBNAME=sdss5db
export TOO_DBUSER=sdss
export TOO_DBHOST=operations.sdss.org
export TOO_DBNAME=sdss5db

DATE=`date "+%Y-%m-%d"`

Expand All @@ -27,5 +30,5 @@ too dump-sdss-id --root $SDSS_ID_DIFFS_PATH/$DATE $DATE
SDSS_ID_FLAT_DIFFS=$SDSS_ID_DIFFS_PATH/$DATE/sdss_id_flat.csv
SDSS_ID_STACKED_DIFFS=$SDSS_ID_DIFFS_PATH/$DATE/sdss_id_stacked.csv

psql -h pipelines.sdss.org -U sdss -d sdss5db -c "\copy catalogdb.sdss_id_flat FROM '$SDSS_ID_FLAT_DIFFS' CSV HEADER;"
psql -h pipelines.sdss.org -U sdss -d sdss5db -c "\copy catalogdb.sdss_id_stacked FROM '$SDSS_ID_STACKED_DIFFS' CSV HEADER;"
psql -h pipelines.sdss.org -U u0931042 -d sdss5db -c "\copy catalogdb.sdss_id_flat FROM '$SDSS_ID_FLAT_DIFFS' CSV HEADER;"
psql -h pipelines.sdss.org -U u0931042 -d sdss5db -c "\copy catalogdb.sdss_id_stacked FROM '$SDSS_ID_STACKED_DIFFS' CSV HEADER;"

0 comments on commit f1cfaa4

Please sign in to comment.