-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from AnalogJ/cron
- Loading branch information
Showing
11 changed files
with
60 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/dist | ||
/vendor | ||
/.idea | ||
/.github | ||
/.git | ||
/webapp/frontend/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Cron runs in its own isolated environment (usually using only /etc/environment ) | ||
# So when the container starts up, we will do a dump of the runtime environment into a .env file that we | ||
# will then source into the crontab file (/etc/cron.d/scrutiny.sh) | ||
|
||
printenv | sed 's/^\(.*\)$/export \1/g' > /env.sh | ||
|
||
# now that we have the env start cron in the foreground | ||
echo "starting cron" | ||
cron -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if [ -n "${TZ}" ] | ||
then | ||
ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime | ||
echo "${TZ}" > /etc/timezone | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
MAILTO="" | ||
# Example of job definition: | ||
# .---------------- minute (0 - 59) | ||
# | .------------- hour (0 - 23) | ||
# | | .---------- day of month (1 - 31) | ||
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... | ||
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat | ||
# | | | | | | ||
# * * * * * user-name command to be executed | ||
|
||
# correctly route collector logs (STDOUT & STDERR) to Cron foreground (collectable by Docker STDOUT) | ||
# cron schedule to run daily at midnight: '0 0 * * *' | ||
# System environmental variables are stripped by cron, source our dump of the docker environmental variables before each command (/env.sh) | ||
0 0 * * * root . /env.sh; /scrutiny/bin/scrutiny-collector-metrics run >/proc/1/fd/1 2>/proc/1/fd/2 | ||
# An empty line is required at the end of this file for a valid cron file. |
2 changes: 1 addition & 1 deletion
2
rootfs/etc/services.d/jobber/finish → rootfs/etc/services.d/cron/finish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/execlineb -S0 | ||
|
||
echo "jobber/cron exiting" | ||
echo "cron exiting" | ||
s6-svscanctl -t /var/run/s6/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
# Cron runs in its own isolated environment (usually using only /etc/environment ) | ||
# So when the container starts up, we will do a dump of the runtime environment into a .env file that we | ||
# will then source into the crontab file (/etc/cron.d/scrutiny.sh) | ||
|
||
printenv | sed 's/^\(.*\)$/export \1/g' > /env.sh | ||
|
||
echo "starting cron" | ||
cron -f |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.