1

I have been trying to create a cron job on my Openshift 3 Starter app. I have read the docs HERE but I guess I'm not understanding them correctly.

I would like run a simple python tcron.py script that prints out a timestamp every minute. I have tried the following to set up the cron job.

 oc run tcron --schedule="* * * * *" --image=python --restart=OnFailure -- python vscan/tcron.py

The above command gives me the error:

 Error from server (Forbidden): User "<MY EMAIL ACCOUNT>" cannot create cronjobs.batch in the namespace "vscan": User "<MY EMAIL ACCOUNT>" cannot create cronjobs.batch in project "vscan" (post cronjobs.batch)

What is the correct way of creating a cron job on openshift 3 starter?

fat fantasma
  • 7,483
  • 15
  • 48
  • 66

1 Answers1

0

Jobs are only available in the OpenShift Online Pro environments. You can see what you get in Starter compared to Pro at:

Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134
  • Thanks. I missed that. I was used to Openshift 2 having cron jobs in their starter plan. – fat fantasma Dec 06 '17 at 22:22
  • I used to use cron jobs in Openshift 2 as well. Have you found some other free online service allowing one to run scripts periodically? – loic17 Oct 09 '19 at 14:41