I have an OpenShift DIY cartridge so, i need to do some work daily, i read this article : Run CRON job every 5 minutes on OpenShift (Red Hat Cloud) and do it by making a file in : ~/app-root/runtime/repo/.openshift/cron/minutely/awesome_job.sh with content which is :
#!/bin/bash
#chmod +x ~/app-root/runtime/repo/.openshift/cron/minutely/awesome_job.sh
#minute=$(date '+%M')
#if [ $minute == 12 ]; then
minute=$(date +%M)
if [[ $minute =~ [05]$ ]]; then
date > ~/app-root/runtime/repo/www/sie.txt
fi
so how can i tell if it is working or not? ( or i need to run some app via rhc for running cron job in default DIY cartridge)
I think you need to change
to
so that the results of the "date" command will actually get pushed into that file