diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-07-05 23:38:10 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-07-05 23:38:10 +0200 |
commit | b51bcba26398a90f9d29d7ced2615a88040a6aac (patch) | |
tree | 16aa0cf512e06878172a7a36955d8b772a757c9e /.openshift/cron/minutely/poller | |
parent | 17d004d52b1e5d6af39f2c55613c90c25b1dea84 (diff) | |
download | volse-hubzilla-b51bcba26398a90f9d29d7ced2615a88040a6aac.tar.gz volse-hubzilla-b51bcba26398a90f9d29d7ced2615a88040a6aac.tar.bz2 volse-hubzilla-b51bcba26398a90f9d29d7ced2615a88040a6aac.zip |
Added cron script to exexute poller every 5 minutes
Diffstat (limited to '.openshift/cron/minutely/poller')
-rwxr-xr-x | .openshift/cron/minutely/poller | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.openshift/cron/minutely/poller b/.openshift/cron/minutely/poller new file mode 100755 index 000000000..e1ebdb751 --- /dev/null +++ b/.openshift/cron/minutely/poller @@ -0,0 +1,10 @@ +#!/bin/bash +if [ ! -f $OPENSHIFT_DATA_DIR/last_run ]; then + touch $OPENSHIFT_DATA_DIR/last_run +fi +if [[ $(find $OPENSHIFT_DATA_DIR/last_run -mmin +4) ]]; then #run every 5 mins + rm -f $OPENSHIFT_DATA_DIR/last_run + touch $OPENSHIFT_DATA_DIR/last_run + # The command(s) that you want to run every 5 minutes +cd /var/lib/openshift/55999305e0b8cd838f000053/app-root/repo; /opt/rh/php54/root/usr/bin/php include/poller.php +fi |