diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-04-17 01:59:31 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-04-17 01:59:31 -0600 |
commit | 50cd710163edb398e72d56414d956607919a805b (patch) | |
tree | 6c26892259971ade48fef6160a93712c913363a3 /aux | |
parent | f5d2c5668d7c79ff24afebe36a1f9879f2eb3d5f (diff) |
imworkingon: Add a systemd unit to flush the cache at midnight
Diffstat (limited to 'aux')
-rw-r--r-- | aux/www-refresh.service | 8 | ||||
-rw-r--r-- | aux/www-refresh.timer | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/aux/www-refresh.service b/aux/www-refresh.service new file mode 100644 index 0000000..7336f1c --- /dev/null +++ b/aux/www-refresh.service @@ -0,0 +1,8 @@ +[Unit] +Description="Website update cron job" + +[Service] +Type=oneshot +Environment=LANG=en_US.UTF-8 +WorkingDirectory=~/www +ExecStart=sh -c 'rm -rf .http-cache && make' diff --git a/aux/www-refresh.timer b/aux/www-refresh.timer new file mode 100644 index 0000000..d507e2f --- /dev/null +++ b/aux/www-refresh.timer @@ -0,0 +1,12 @@ +[Unit] +Description=Website update cron job + +[Timer] +Persistent=true +# somewhere between 4am and 5am MDT (in the summer; +# between 3am and 4am MST in the winter) +OnCalendar=*-*-* 10:00:00 UTC +RandomizedDelaySec=1h + +[Install] +WantedBy=default.target |