We have a regular newsletter that we want to send out 6 days a week (Mon-Sat). Right now, the scheduler only gives the option of every day or every weekday. Is there anyway to specify the days or do I just have to create a duplicate automation just for Saturdays? We manually change the send once in a while and I'm just worried that having two automations is going to lead to editors making a mistake.
2 Answers
If you select "weekly" as the cadence, there is an option to choose the days of the week and you can select as many as you need. I just selected Mon-Sat.
As you mentioned you can either create a separate Automation that would run only on Saturdays or if it is crucial to run everything within one Automation with that specific schedule then you can do that:
- Create Data Extension, let's call it "Sunday_Check" with the field "isSunday" (Boolean, nullable);
- In your Automation that would have a daily running schedule set as a first step
Script Activity
:
<script type="javascript" runat="server">
Platform.Load("Core", "1");
/* Cleans whole Data Extension */
var prox = new Script.Util.WSProxy();
var action = "ClearData";
var props = { CustomerKey: 'xxxx' }; /* Change 'xxxx' to Data Extensions' External Key */
var data = prox.performItem("DataExtension", props, action);
/* Checks if today is Sunday, then add record to DE */
var isSunday = (new Date().getDay());
if( isSunday == 0 ) /* Sunday = 0, Monday = 1 and so on */
var rowAdd = Platform.Function.InsertData('Sunday_Check',['isSunday'],['True']);
else
</script>
- In the Automation add
Verification Activity
to validate "Sunday_Check" Data Extension havingCount is greater than 0
then stop the automation - This way, each day you would have a check whether today is Sunday and if it is then the DE would be populated with a record, and the Verification Activity would stop the Automation because of that. On other days, it would simply let the Automation run the next steps.