From b51bcba26398a90f9d29d7ced2615a88040a6aac Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sun, 5 Jul 2015 23:38:10 +0200 Subject: Added cron script to exexute poller every 5 minutes --- .openshift/cron/minutely/poller | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .openshift/cron/minutely/poller 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 -- cgit v1.2.3