Bug 865358 - Can't start/trigger the cron job for cron-1.4 embed application
Can't start/trigger the cron job for cron-1.4 embed application
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Jhon Honce
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2012-10-11 05:44 EDT by Rony Gong
Modified: 2015-05-14 19:00 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-06 13:50:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rony Gong 2012-10-11 05:44:22 EDT
Description of problem:
the cron job script can't be executed in cron-1.4 embed application

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Create a app and embed cron-1.4
2.New file $app/.openshift/cron/minutely/date.sh
with: echo 'date  >> $OPENSHIFT_REPO_DIR/php/date123.txt'
3.git push,wait 2 minutes
Actual results:
[qgong@localhost dev]$ curl http://qphp-qgong2.dev.rhcloud.com/date123.txt
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL /date123.txt was not found on this server.</p>
<address>Apache/2.2.17 (Red Hat Enterprise Web Server) Server at qphp-qgong2.dev.rhcloud.com Port 80</address>

Expected results:
date123.txt created and access curl http://qphp-qgong2.dev.rhcloud.com/date123.txt could get the time

Additional info:
Comment 1 Jhon Honce 2012-10-11 12:13:35 EDT
The job symlinks have the prefix openshift-origin while the actual files have the prefix of openshift.

For example,

openshift-origin-cron-minutely -> /usr/libexec/openshift/cartridges/embedded/cron-1.4/jobs/openshift-origin-cron-minutely

For file named, openshift-cron-minutely
Comment 2 Jhon Honce 2012-10-11 12:34:42 EDT
Fixed in https://github.com/openshift/origin-server/pull/647
Comment 3 Rony Gong 2012-10-11 21:58:36 EDT
Verified on devenv_2317
1.Create a app and embed cron-1.4
2.New file $app/.openshift/cron/minutely/date.sh
with:  date  >> $OPENSHIFT_REPO_DIR/php/date123.txt
3.git push,wait 2 minutes
[qgong@localhost dev]$ curl http://qphp-qgong9.dev.rhcloud.com/date.txt
Thu Oct 11 21:50:02 EDT 2012
Thu Oct 11 21:51:02 EDT 2012
Thu Oct 11 21:52:02 EDT 2012
Thu Oct 11 21:53:02 EDT 2012
Thu Oct 11 21:54:01 EDT 2012
Thu Oct 11 21:55:02 EDT 2012

Note You need to log in before you can comment on or make changes to this bug.