From 5a9510bf7abb76e36a5c0c109045de04485a5f6e Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Mon, 11 Feb 2019 17:04:29 -0700 Subject: [PATCH] Add cron script to prune thumbnail cache (close #2) --- cron.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 cron.php diff --git a/cron.php b/cron.php new file mode 100644 index 0000000..de55b25 --- /dev/null +++ b/cron.php @@ -0,0 +1,21 @@ + 60 * 60 * 24) { + if (preg_match('/\.jpg$/i', $file)) { + echo "Deleting $file\n"; + unlink($path . $file); + } + } + } +} \ No newline at end of file