summaryrefslogtreecommitdiff
path: root/blob/cronjob.php
diff options
context:
space:
mode:
authorroot2014-09-13 22:26:58 +0200
committerroot2014-09-13 22:26:58 +0200
commitc5639ee890215e4e8e0f544821ea8d285ca58eb8 (patch)
tree29f685943c61c4d7ec0e376e485686e985b97065 /blob/cronjob.php
parentf8c60cae423fc78ed21d17a9217716ccc1e6dab1 (diff)
downloadvideo-dl-c5639ee890215e4e8e0f544821ea8d285ca58eb8.tar.gz
init
Diffstat (limited to 'blob/cronjob.php')
-rw-r--r--blob/cronjob.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/blob/cronjob.php b/blob/cronjob.php
new file mode 100644
index 0000000..a54c9ec
--- /dev/null
+++ b/blob/cronjob.php
@@ -0,0 +1,12 @@
+<?php
+
+require(dirname(__FILE__)."/../config.php");
+
+if($db->exec("DELETE FROM videos")){
+ exec("rm -f " . $ABSCACHEDIR ."/*", $output, $ret);
+ if($ret != 0){
+ die("Failed to flush the cache.");
+ }
+} else {
+ die("Failed to flush the database.");
+}