Skip to content
Snippets Groups Projects

Feat cron refine

Merged Mitchell Moore requested to merge feat-cron-refine into master
Files
15
cron_init.sh 0 → 100755
+ 36
0
#!/bin/bash
# resources
#SBATCH cpus-per-task=1
#SBATCH mem-per-cpu=4G
#SBATCH array=-1%1
#SBATCH partition=express
# job name, error and output files
#SBATCH --job-name=cron-job
#SBATCH error=err_%j_4a.log
#SBATCH output=out_%j_%4a.log
#SBATCH ntasks=1
# email address to request notifications when the job is complete or if it fails
#SBATCH --mail-type=FAIL
#SBATCH --mail-user=$USER@uab.edu
module load Singularity
singularity pull docker://mmoo97/dtn_image:latest
# Build crontab
sbatch_dir=$(which sbatch)
echo "#!/usr/bin/bash
# run generate_data.py
# git add, commit, and push
MAILTO=$USER@uab.edu
#git add data.csv
#git commit -m "update data"
#git push
# runs cronjob.sh every 4 hours every day
00 */4 * * * cd $USER_DATA/DTN_tests && $sbatch_dir $USER_DATA/DTN_tests/cronjob.sh $CLIENT $TOKEN" > dtn-crontab
echo $PATH > path
Loading