Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Schedule to run every 10-15 min between a time period

ehellblom
6 - Meteoroid

Hi,

 

I am looking to schedule a very small workflow to run every 10-15 min (the workflow itself runs in 5 sec) between 6 am to 9 am on weekdays via the gallery but I am struggling to find a function like that. Is that possible?

 

Perhaps there might even be a better way to do what I am doing - I have files coming in in the morning which sometimes can be late so looking to find a way to have a notification/email send out when the file arrives, hence the multiple refreshes as it will send the email when the data is today's date. I have been told it is not possible to do in the data source itself so trying to find alternative solutions!

 

Thanks!

5 REPLIES 5
DavidP
17 - Castor
17 - Castor

Are the incoming files dropped in a folder?

 

If so, you can build a small workflow that uses a browse tool to look into the folder, sort by creation time descending and sample the first record. Then use a filter tool with Expression todate([CreationTime])=todate(DateTimeNow())

 

If the file is there, you'll have 1 record in the true output, if not there will be none.

 

So now you can use a Test tool that gives you an alert if Recordcount > 0 and use this to trigger an email event after run with errors to send an email telling you the file is there.

ehellblom
6 - Meteoroid

Hi,

 

Thank you for your response. Unfortunately it doesn't or at least I don't have access to it. 

 

My current idea works something like this: 

It refreshes via the gallery every 10-15 min, runs the latest day from the data base, if it matches today's date it sends an email saying it is in and loads it and and overwrites the table in my own data base.

Then on the next run, it runs but then it joins up with the same data source it wrote in to previously in to, if the date already exists in there it stops it and stops sending emails. Then after a while it stops until start running next day.

 

Tableau has a similar logic so wondering if it is possible.

 

Does it make sense/better way or is my logic completely off the chart?

 

DavidP
17 - Castor
17 - Castor

Your idea can definitely work.

 

Remember to also convert datetimenow() to a date with a Left function or Todate() function in order to compare to the date part of Load Time.

 

I would use the Runtime events functionality instead of the email tool, as the email tool will always want to send an email every time the workflow is run, regardless of the outcome of the test.

 

With events, you can design your Test tool to only create an error if load time form the Gallery = today's date and != previous load time. The error then triggers the email. Otherwise load time is just written to the file.

ehellblom
6 - Meteoroid

Ah, thank you for your tips!

But there is no way to have the gallery scheduled to run every 10-15 min to refresh to see if it is in the database and send an email when it is there?

I guess you would be able to set multiple schedules on the gallery but unfortunately we wont be able to do that. Or perhaps not on the gallery, just scheduled on designer instead?

DavidP
17 - Castor
17 - Castor

The gallery will just execute the workflow that you uploaded as per the schedule that is configured.

 

You have to have a desktop scheduler licence in order to schedule from your desktop. This could work (if you have a scheduler desktop licence) as long as you can connect to the data source from your desktop Alteryx Designer.