title: execute scripts as cron in openshift docker
body: <p>We are having a openshift environment where we need to backup data from some persistant volume source to destination everyday. I am thinking about setting up a container especially for this purpose and give the entry point as a bash script which does this copy action. How can I make sure that this script executes every day only once ? I can mention the sleep in script but that is not a good approach and would have effect if the POD restarts automatically in between. Please let me know the correct approach to do this ? I'm using OpenShift Web Console: v3.11.98</p>
  
  <p>I can use sleep but not sure how to tackle the scenario where pod restarts</p>
  
  <pre><code>#!/bin/bash
  
  if [ ! -e /source/]
  then
          echo source /source is not mounted in the container
          exit 20
  fi
  
  if [ ! -e  /destination ]
  then
          echo source /destination is not mounted in the container
          exit 20
  fi
  
  today1=`date +"%Y-%m-%d"`
  
  
  mkdir /destination/${today1}
  cp -r /source/* /destination/${today1}
  </code></pre>
  
  <p>How can I run this script everyday to backup the fiels from one persistant volume to another. Any better way to do this other than running in a docker ?</p>