OpenShift - Create cronjob using the oc create cronjob command

by
Jeremy Canfield |
Updated: August 06 2024
| OpenShift articles
If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.
The oc create cronjob (or oc create cj) can be used to create a cronjob. In this example, a cronjob named my-cronjob is created in the currently selected project / namespace. The cronjob will run once every minute and will issue the date command.
~]$ oc create cronjob my-cronjob --image=busybox --schedule="*/1 * * * *" -- date
cronjob.batch/my-cronjob created
Did you find this article helpful?
If so, consider buying me a coffee over at