How to Run Automations More Frequently using SSJS

One of the limitations of Automation Studio is only being able to run automations hourly. There are some use-cases where you may need to run a query multiple times within an hour. For example, if you have a Decision Split in a journey that depends on data that needs to be updated, i.e it is using Contact Data and it needs to be refreshed often. You may want something querying your data extension more than once an hour.

Whatever the case, the dropdown only gives you the shortest interval of Hourly.

Scheduling hourly in Automation Studio
The shortest interval of time available to repeat the automation is hourly.

See downsides below of running automations more frequently.

There are ways to circumvent this and run automations more frequently:

  • Adding Wait Periods between duplicate automation activities
  • Cloning the automation and scheduling it to run at the hour mark and half-hour mark
  • Using SSJS in a script activity to run your automation

Adding Wait Periods between duplicate automation activities

Duplicating automations in Automation Studio
Duplicating automation activities in Automation Studio

You can set the automation to run hourly with 15 minute waits in between. But if you have more than one set of automation activities, it gets cumbersome to duplicating those activities. It also makes it difficult to make updates as you’ll have to make the same updates multiple times (depending on how many times you have duplicated the activities).

Cloning the automation and scheduling it to run at the Hour and Half-Hour mark

Duplicate an automation to run at different times

Using SSJS in a script activity to run the automation

Alternatively, you could use SSJS to start the automation that you want to repeat. For example,

  • Automation 1: (Automation that you want to run more frequently)
  • Automation 2: SSJS script that starts the automation 1 above.
					

Github Gist: https://gist.github.com/jacksonpchen/d976d7086540754fea01aeeb27ba78a6

Downsides

There are downsides to constantly running automations on a more frequent basis. The first is the most obvious in that it bogs down the system. If you have other automations running, it slows those down as well.

Also there may be other solutions available to accomplish what you need done such as using an API or Salesforce Data.

Leave a Reply

Your email address will not be published. Required fields are marked *