This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I am facing a weird issue here. I have a workflow that i have saved on the server. If I run it manually from the server Gallery then it works as intended. But the same job "fails" when I run it on a schedule.
What I want is the workflow to either go through container 1 or container 2. Below is the formula I use in the action tools but the true/false is opposite. So if datetimenow is between 08:00 and 23:59 then the top container is enabled and the bottom one is disabled. If the date is not in that range, then the top container is disabled and the bottom on is enabled.
if DateTimeNow() >= ToDateTime(left(datetimenow(),10)+" 08:00:00")
and DateTimeNow() <= ToDateTime(left(datetimenow(),10)+" 23:59:59")
then "True" else "False" endif
And this date check only works if I run it manually from the gallery. As you can see from the screenshots, the manual run outputs only 1 record, while the scheduled one outputs 2 records.
The reason I need this to work is that we are not allowed to run ETL jobs outside the time range, but Alteryx server cannot schedule "run every hour, every day, but only between 08:00 and 23:59". So I want to schedule the workflow to run every hour, but if the datetime is out of range, then the whole workflow is disable.
You could probably simplify this using a detour tool. It would look something like the image below.
Notice that the Text Box tool is hidden, so it won't show up in the interface.
Another way to use the Detour is without a Detour End, which would allow you to pick one set of actions if it is within the timeframe you specify and another action (or inaction) when it is outside of the timeframe.
One thing to consider when testing/trying out options in the Scheduler is that if you schedule a workflow or app, then make changes to that app, you must Update the workflow OR Delete then reschedule the app using the 'new' version for the app changes to be recognized.
Another thing is you may want to try to save the workflow/app as a package (yxzp file) and schedule the package. If you don't know how to do that, go to Options: Export Workflow.
Hmm i wont be able to check it this way, because everything works fine if I run it manually. Correct values are getting passed on. It only fails when it is ran from the Gallery and at the same time that an automatic schedule is doing the execution.
So my current workaound is that I use the Test tool. The Test tool throws an error if datetime is out of range. The bad part about this, is that the server logs will be clogged with faulty error messages.