Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmuellr/bluemix-cron
A sample application for bluemix that runs cron tasks.
https://github.com/pmuellr/bluemix-cron
Last synced: about 1 month ago
JSON representation
A sample application for bluemix that runs cron tasks.
- Host: GitHub
- URL: https://github.com/pmuellr/bluemix-cron
- Owner: pmuellr
- Created: 2014-02-13T02:49:09.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-14T20:12:03.000Z (almost 11 years ago)
- Last Synced: 2024-04-09T21:04:43.873Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 113 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
bluemix-cron
================================================================================A sample application for bluemix that runs cron tasks.
The sample runs two "cron jobs",
using the [npm cron package](https://www.npmjs.org/package/cron). One cron job
runs every 10 seconds, the other runs every 15 seconds. Both jobs just
print the current time and a short message to stdout.install
--------------------------------------------------------------------------------Run the following commands to install this sample:
git clone https://github.com/pmuellr/bluemix-cron.git
cd bluemix-cron
npm installrun locally
--------------------------------------------------------------------------------Run the server with the command:
node server
By default the server uses port 3000; to use a different one, set the PORT
environment variable:PORT=4000 node server
You should see messages printed to the console every 10 and 15 seconds, and
an HTTP server will be running at the default or specified port that doesn't
do much.run on bluemix
--------------------------------------------------------------------------------Install per the install directions above, then from within the `bluemix-cron`
directory, runcf push
where `` is the name you'd like to use for this application.
When the `cf push` completes, the application should have been uploaded,
staged, and started on bluemix. You can go to the URL displayed in the
`cf push` output and see the same web page output as running locally.You can get see the console logs with either of these commands:
cf logs
cf files logs/stdout.logWhen you're done verifying this application work, you should stop it because
it's not doing anything useful:cf stop
license
--------------------------------------------------------------------------------Apache License, Verison 2.0