Scheduling

You can schedule Hex apps to re-run on a set schedule, at Hourly, Daily, Weekly, or Monthly frequencies.

Important: You must first publish your project for scheduled runs to start taking place. Further, scheduled runs will operate on the currently-published version of the logic, which may differ from the version you're viewing. Learn more about published versions here.

The built-in $hex_scheduled variable is a boolean that evaluates to true if the logic run is scheduled, e.g., so a database write-back is only triggered on a scheduled run. This can be useful for workflows with long-running or computationally expensive query steps, so the app is more responsive for end users. This can be achieved using a pattern like the below:

if $hex_scheduled:
## expensive query step
## write results out to a file or database
else:
## read from written file or database