Skip to content

Commit

Permalink
Move cron process to foreground
Browse files Browse the repository at this point in the history
- Execute checkBackgroundProcesses in background
- Execute cron process in foreground to keep the container alive
- Remove 'sleep infinity' trick in case cron is enabled
  • Loading branch information
lucasmontoya13 committed Aug 22, 2024
1 parent e8847a3 commit 9227353
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/files/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ curl -k http://"$SITE_NAME"/API/SystemAPI?method=runPendingDatabaseUpdates

# Start Cron
if [ "$ASPEN_CRON" == "yes" ]; then
service cron start
php /usr/local/aspen-discovery/code/web/cron/checkBackgroundProcesses.php "$SITE_NAME" &
cron -f -L 2
else
/bin/bash -c "trap : TERM INT; sleep infinity & wait"
fi

# Infinite loop
/bin/bash -c "trap : TERM INT; sleep infinity & wait"

0 comments on commit 9227353

Please sign in to comment.