Skip to content

Commit

Permalink
TLKAR2-23: configuration for production application (tl-its-umich-edu#16
Browse files Browse the repository at this point in the history
)

* TLKAR2-23: configuration for production application

* TLKAR2-23, TLKAR-24: add copy of cron from production miserver

* TLKAR2-23, TLKAR2-22, TLKAR2-24: update dev, production cron.
  • Loading branch information
dlhaines authored Nov 29, 2017
1 parent 53750d2 commit 9968d3d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 29 deletions.
22 changes: 14 additions & 8 deletions rootdir_etc_cron.d/kartograafr
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Production kartograaf schedule
#
# During 08:00 and 15:00 runs, process assignment groups and
# kartograafr: ArcGIS/Canvas integration
# Created from miserver version on 2017/11/29.

[email protected]

# Weekdays: At 07:00, 11:00, 15:00, and 19:00, process assignment groups and
# send email to instructors
0 8,15 * * * * /usr/local/apps/kartograafr/startup.sh --mail > /proc/1/fd/1 2>&1
0 7,11,15,19 * * 1-5 /usr/local/apps/kartograafr/startup.sh --mail > /proc/1/fd/1 2>&1

# Weekdays: On all other hourly runs between 07:00 and 19:00, process
# assignment groups without sending email to instructors
0 8-10,12-14,16-18 * * 1-5 /usr/local/apps/kartograafr/startup.sh > /proc/1/fd/1 2>&1

# During all other hourly runs, process assignment groups without
# sending email to instructors
0 0-7,9-14,16-23 * * * * /usr/local/apps/kartograafr/startup.sh > /proc/1/fd/1 2>&1
# end
# Weekends: At 07:00, process assignment groups and send email to instructors
0 7 * * 0,6 /usr/local/apps/kartograafr/startup.sh --mail > /proc/1/fd/1 2>&1
#end
35 changes: 14 additions & 21 deletions rootdir_etc_cron.d/kartograafr.dev
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
# Cron in docker for Kartograafr
# During 08:00 and 15:00 runs, process assignment groups and
# send email to instructors
### original schedule
#######0 8,15 * * * * * /usr/local/apps/kartograafr/startup.sh --mail > /proc/1/fd/1 2>&1
#0 8,15 * * * * /usr/local/apps/kartograafr/startup.sh --mail > /proc/1/fd/1 2>&1
# kartograafr: ArcGIS/Canvas integration
# Created from miserver version on 2017/11/29.

##### EXAMPLE: starting at 5 after the hour run every twenty minutes
##### EXAMPLE: #5-59/20 * * * *
#[email protected]

######
### run every 10 minutes starting at minute zero
0-59/10 * * * * /usr/local/apps/kartograafr/startup.sh --mail > /proc/1/fd/1 2>&1
######
# Weekdays: At 07:00, 11:00, 15:00, and 19:00, process assignment groups and
# send email to instructors
###0 7,11,15,19 * * 1-5 root /usr/bin/python /usr/local/apps/kartograafr/main.py --mail
0 7,11,15,19 * * 1-5 /usr/local/apps/kartograafr/startup.sh --mail > /proc/1/fd/1 2>&1

# During all other hourly runs, process assignment groups without
# sending email to instructors
# original schedule
#0 0-7,9-14,16-23 * * * * /usr/local/apps/kartograafr/startup.sh > /proc/1/fd/1 2>&1
# Weekdays: On all other hourly runs between 07:00 and 19:00, process
# assignment groups without sending email to instructors
###0 8-10,12-14,16-18 * * 1-5 root /usr/bin/python /usr/local/apps/kartograafr/main.py
0 8-10,12-14,16-18 * * 1-5 /usr/local/apps/kartograafr/startup.sh > /proc/1/fd/1 2>&1

######
# run every 10 minutes starting at 5 past the hour
5-59/10 * * * * /usr/local/apps/kartograafr/startup.sh > /proc/1/fd/1 2>&1
######
#end
# Weekends: At 07:00, process assignment groups and send email to instructors
###0 7 * * 0,6 root /usr/bin/python /usr/local/apps/kartograafr/main.py --mail
0 7 * * 0,6 /usr/local/apps/kartograafr/startup.sh --mail > /proc/1/fd/1 2>&1
18 changes: 18 additions & 0 deletions rootdir_etc_cron.d/kartograafr.miserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# kartograafr: ArcGIS/Canvas integration
## mi-server version copied 2017/11/29

# Moved from root crontab to this file and MAILTO added
# by scs, 2016/10/04 12:45

[email protected]

# Weekdays: At 07:00, 11:00, 15:00, and 19:00, process assignment groups and
# send email to instructors
0 7,11,15,19 * * 1-5 root /usr/bin/python /usr/local/apps/kartograafr/main.py --mail

# Weekdays: On all other hourly runs between 07:00 and 19:00, process
# assignment groups without sending email to instructors
0 8-10,12-14,16-18 * * 1-5 root /usr/bin/python /usr/local/apps/kartograafr/main.py

# Weekends: At 07:00, process assignment groups and send email to instructors
0 7 * * 0,6 root /usr/bin/python /usr/local/apps/kartograafr/main.py --mail
3 changes: 3 additions & 0 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ if [ $(uname) == Darwin ]; then
exit 1;
fi

# get rid of any existing complied python in case there is a change via symbolic link.
find . -name \*pyc -delete

# Use the python virtual environment.
source ${VIRTUAL_ENV}/bin/activate
echo "Using python virtual environment: ${VIRTUAL_ENV}"
Expand Down

0 comments on commit 9968d3d

Please sign in to comment.