<p>The doc <a href="https://docs.openshift.com/container-platform/3.9/dev_guide/cron_jobs.html" rel="nofollow noreferrer">https://docs.openshift.com/container-platform/3.9/dev_guide/cron_jobs.html</a> provides details of creating a cron job.</p>
<p>To start a scheduled task that executes a build every 10 mins I use the command:</p>
<pre><code>oc run run-build 161/my-app --image=myimage --restart=OnFailure --schedule='*/10 * * * *' 
</code></pre>
<p>Which returns:</p>
<pre><code>cronjob.batch/run-build created
</code></pre>
<p>But the job fails to start:</p>
<p>The log of pod displays:</p>
<pre><code>Error: unknown command &quot;161/my-app&quot; for &quot;openshift-deploy&quot;
Run 'openshift-deploy --help' for usage.
</code></pre>
<p>Have I configured the command ( <code>oc run run-build 161/my-app --image=myimage --restart=OnFailure --schedule='*/10 * * * *'</code> ) to start the cron job incorrectly ?</p>

blue-sky
<p>You are trying to override the image <code>CMD</code>/<code>ARG</code> with the <code>161/my-app</code> command (which seems not to be valid).</p>
<p>You should use:</p>
<pre><code>oc run run-build --image=myimage --schedule='*/10 * * * *' \
--restart=OnFailure \
--command -- &lt;YOUR COMMAND HERE&gt;
</code></pre>
<p><em>Where <code>run-build</code> is the name of your created cronjob.</em></p>
<p>If you want to use the default <code>CMD</code>/<code>ARG</code> built in the container image, just omit the <code>--command</code> flag and its value.</p>
