Page 1 of 1
Initiate a job at a designated point in time / last day of the week / month etc.
Posted: Tue Apr 27, 2021 5:27 pm
by Arthur
Hi all;
Is it at all possible to initiate a job intelligently on the last day of the week / month or sth alike ??
There are options to have a dummy started / job injected etc. at intervals, but seemingly no obvious way crosses my mind if I wanted to start a job at a designated point in time. Last day of the week, specific day (Mon-Fri), last or first day of the month....
I would have thought that since Switch can gain access to the system calendar / date - this should somehow be possible.
But how ?? Anyone has an idea on how to do that without scripting ??
Re: Initiate a job at a designated point in time / last day of the week / month etc.
Posted: Wed Apr 28, 2021 8:33 am
by freddyp
There are properties on the flow itself that allow to define when the flow can run.
Re: Initiate a job at a designated point in time / last day of the week / month etc.
Posted: Wed Apr 28, 2021 10:39 am
by Arthur
freddyp wrote: ↑Wed Apr 28, 2021 8:33 am
There are properties on the flow itself that allow to define when the flow can run.
Thank you kindly, but that does not help....
It is not the whole flow that needs to be initiated at a designated moment in time, but a job, that needs to be started.
I understand that Switch allows for no control of this type.
I have found a workaround using Windows Task Scheduler and a simple BAT to inject a dummy file to a user folder and that way the OS takes control over the last day of the month / week in conjunction with a desired hour/min etc. as seemingly it offers more flexibility in that regard. So right now the job is scheduled to start every month, on the last day at 23:59 p.m.
Would be nice to have this available in Switch, so that all actions could be Switch controlled and centralised.
Re: Initiate a job at a designated point in time / last day of the week / month etc.
Posted: Wed Apr 28, 2021 11:04 am
by freddyp
In that case look at the OUTGOING connection of "Hold job". It has the same properties as the flow.
Re: Initiate a job at a designated point in time / last day of the week / month etc.
Posted: Wed Apr 28, 2021 12:23 pm
by Arthur
Thank you Freddy P.
That could help indeed

I will try to use this method in the future, since I have already found a working solution for this particular need - the job is a bunch of files injected from repository using a wildcard, triggered by the dummy initiated at 23:59 pm on the last day of each month
These are internal daily logs, which I needed wrapped up in a folder in monthly increments and archived in a hierarchy.
The HoldJob Outgoing connection properties though seem to require some testing to figure out the right settings for the desired behaviour.
As always with Switch - one can get the result in many different ways
