Skip to content

Commit

Permalink
cron: export current timezone
Browse files Browse the repository at this point in the history
to make cron use the local timezone.
  • Loading branch information
sni committed Sep 4, 2024
1 parent 9e658b5 commit dbde34b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/maintenance/merge-crontabs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ sys.stdout.write("OMD_ROOT=%s\n" % os.environ['OMD_ROOT'])
sys.stdout.write("OMD_SITE=%s\n" % os.environ['OMD_SITE'])
sys.stdout.write("PATH=%s\n" % os.environ['PATH'])
sys.stdout.write("PYTHONPATH=%s\n" % os.environ['PYTHONPATH'])
if "TZ" in os.environ:
sys.stdout.write("CRON_TZ=%s\n" % os.environ['TZ'])
sys.stdout.write("MAILTO=\"%s\"\n" % omd_config.get('CONFIG_ADMIN_MAIL', os.environ['OMD_SITE']))
sys.stdout.write("# ------------------------------------------------------------\n")

Expand Down
1 change: 1 addition & 0 deletions packages/maintenance/skel/etc/init.d/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cd || exit 1
if [ "$CONFIG_CRONTAB" != on ] ; then
exit 5
fi
. .profile
. lib/omd/init_profile

NAME="crontab"
Expand Down

0 comments on commit dbde34b

Please sign in to comment.