Flint has an inbuilt Scheduler that can be enabled to schedule Flintbit execution as per requirement. Cron expressions are leveraged to achieve this. On Flint Console, we can view the list of enabled as well as disabled schedules along with description and timezone.

 

You can have one or more schedule(s) added to a Flintbox. With the help of this document, you will be able to add a Schedule on Grid.

How to Add a Schedule to Grid from Flint Console?

Let us see how we can add and enable a Schedule in simple steps as below:

  1. Log on to Flint UI Console
  2. Visit the Schedules link on left navigation bar
  3. Click on Add Schedule
  4. In the form displayed, fill up necessary form fields ( as shown below )
  5. Click on Add button

Configuration parameters

ParameterDescriptionRequired
NameName of the Scheduler to add.true
TriggerFlintbit reference path or Flintbit name ( flint's convention ) to be triggered when a schedule starts running.true
DescriptionSummarization of the Scheduler.false
Cron ExpressionCron expression to schedule Flintbit execution. Example: For a scheduler to trigger Flintbit "At every 1st second", cron expression will be "1 ? *".true
TimezoneTimezone in which the schedule will be based and Cron Expression will be resolved.false
Input(JSON)Contains all the parameters that have to be supplied to the Flintbit as input. Default is a empty JSON Object.false

The above steps will only add the Schedule. To enable the Schedule, click on the Actions button against the name of your newly added Schedule and select Enable action.

How to Add a Scheduler to Grid Manually?

Let us see how we can add a Scheduler manually in simple steps as below:

  • Navigate to the Flintbox directory ( mybox ) to which scheduler has to be added.
    • Navigate to flint-x.x.x.x ( flint installation directory )
    • Navigate to flintbox ( flintbox directory )
    • Navigate to mybox ( created and configured flintbox directory )
 
$ cd flint-x.x.x.x/
$ cd flintbox/
$ cd mybox/ 

 

  • Create the schedules.conf and paste the scheduler configuration as shown in the below example.

 

"my-schedule" {
description = "runs a flintbit every minute"
trigger = "hello.rb
cron = "0 * * * * ? *" enable = false
input{
my_message = "Welcome to Flint !" 
}
timezone = "UTC"
}

Need help building cron expressions? They can be readily made available with Cron Maket.

 

 

  • Add schedules.conf to mybox

 

$ git add schedules.conf
$ git commit -m "schedule to trigger flintbit every first second"
$ git push


Configuration parameters

Below are the configuration parameters and their values to add new schedulers:

ParameterDescriptionRequired
scheduler-nameName of the Scheduler to add.true
descriptionSummarization of the Scheduler.false
triggerFlintbit reference path or Flintbit name ( flint's convention ) to be triggered when a schedule starts running.true
cronCron expression to schedule Flintbit execution. Example: For a scheduler to trigger Flintbit "At every 1st second", cron expression will be "1 ? *".true
enableIf true, a scheduler will be enabled automatically when the flintbox to which it belongs is enabled. Default is falsefalse
inputContains all the parameters that have to be supplied to the Flintbit as input. Default is a empty JSON Object.false
timezoneTimezone in which the schedule will be based and Cron Expression will be resolved. Default is the host timezone.false

The above steps will only add the Schedule. To enable the Schedule, visit the Schedules link on Flint Console and click on the Actions button against the name of your newly added Schedule and select Enable action.

 

Scheduler Actions

  1. Enable: Fires the scheduler which in turn triggers the Flintbit as per the cron expression.
  2. Disable: Stops the scheduler execution.
  3. Details: Name, Description, Trigger, Input, Cron and Enable of the added scheduler is shown here.
  4. Edit/Manage: You can change the configuration parameters here.

To enable/disable multiple Schedules, use Bulk Action

On this page:

  • No labels