O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a cron cartridge to an application

In this recipe, you will learn how to add the cron add-on cartridge to your application. The cron cartridge will write the output of the quota command to a file every hour. The database and other cartridges will be covered later in this book.

Getting ready

To prepare for this recipe, you will need rhc installed on your machine. Also, we will make use of the OpenShift application created in the Creating an OpenShift application using the rhc command-line client recipe.

How to do it…

Perform the following steps to add a cron cartridge to your application:

  1. Open a new command-line terminal and run the following command:
    $ rhc add-cartridge --cartridge cron --app myapp
    
  2. Create a new file quota.txt in the application ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required