Skip to content



Plans are special Punch applications that periodically execute punchlines. A plan is similar to a CRON utility. It triggers punchlines at regular points in time.

Plans provide many useful and important features:

  • resiliency : a Plan can be interrupted and restarted from another server, it will properly resume its processing from its last saved state.
  • logging : plans log useful information to be easily monitored.
  • configuration : a plan is defined as a simple hjson or json or yaml file.
  • templating : every punchline executed has been been templated with time ranges.

The following diagram illustrates the way it works. Your punchline configuration file is actually a template file. The plan will be in charge of periodically defining date values, then generating actual job files from the templates, which in turn is scheduled for execution.


Here are typical use cases for Plans:

  • Fetching external data : a Plan schedules a punchline every hour to read some dataset from an external source. It enriches it with useful contextual data. Finally, it stores it in some downstream sink.
  • Aggregation and Statistics : a Plan schedules a punchline that reads time-ranged dataset from Elasticsearch. It computes some statistics and writes them back to Elasticsearch.
  • Alerting : a Plan periodically execute a punchline in charge of checking some alert condition. This is typically how Elastalert works. You can similarly use a plan to compute more sophisticated alerting rules that include machine learning algorithms.


Checkout the plan tutorial for a simple example. The plan configuration is defined in the reference guide plan configuration chapter.