1
votes

I have added my webpage contents to /var/lib/openshift/XXXXXXXXXXXXXXXXXXXXX/app-root/runtime/dependencies/jbossews/webapps/ directory and I can see my webpage. I have not used git repository.

I tried adding one shell script under /var/lib/openshift/XXXXXXXXXXXXXXXXXXXXX/app-root/runtime/repo/.openshift/cron/hourly directly. I dont see the script running. I feel it has to be pushed to some service. Can this be done without git at all?

Adding example: I have not created a git repository. I have a index.html with just some header and body placed under /var/lib/openshift/XXXXXXXXXXXXXXXXXXXXX/app-root/runtime/dependencies/jbossews/webapps/test/. Now I can access the website like www.test-rhtest.rhcloud.com/test/index.html

Now I have a shell script say test.sh. It is as below.

#!/bin/bash echo date >> $HOME/app-deployments/temp.txt

I execute the script test.sh and it creates the file there $HOME/app-deployments/temp.txt. Now I have placed the file under /var/lib/openshift/XXXXXXXXXXXXXXXXXXXXX/app-root/runtime/repo/.openshift/cron/hourly. I waited for hours to see execution, but no luck.

How should I enable this cron now?

1
Can you add the code you've tried already? A minimal, complete, verifiable example is preferred: stackoverflow.com/help/mcvemjk

1 Answers

2
votes

The file SHOULD run, but you have to make sure that you made it executable (chmod +x) on the server. Also, make sure you can run it manually without getting any errors. Also, it seems you should put it into your ~/app-root/repo/... directory, instead of the runtime one.