Created
June 5, 2013 15:45
-
-
Save elgalu/5714909 to your computer and use it in GitHub Desktop.
Cron Job Idea for OpenShift at /.openshift/cron/hourly/foreman
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pushd ${OPENSHIFT_REPO_DIR} > /dev/null | |
# Set env vars | |
source ${OPENSHIFT_REPO_DIR}/.env.openshift | |
# Run jobs | |
# bundle exec rake jobs:work | |
bundle exec foreman start > ${OPENSHIFT_RUBY_LOG_DIR}/foreman.log & | |
# To view the logs: | |
# rhc tail huginn -f ruby-1.9/logs/foreman.log | |
# Go back to initial directory | |
popd > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment