Initiate a job at a designated point in time / last day of the week / month etc.

Post Reply
Arthur
Member
Posts: 113
Joined: Sat Sep 09, 2017 11:58 pm
Location: Yateley, UK

Initiate a job at a designated point in time / last day of the week / month etc.

Post 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 ??
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Initiate a job at a designated point in time / last day of the week / month etc.

Post by freddyp »

There are properties on the flow itself that allow to define when the flow can run.
Arthur
Member
Posts: 113
Joined: Sat Sep 09, 2017 11:58 pm
Location: Yateley, UK

Re: Initiate a job at a designated point in time / last day of the week / month etc.

Post 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.
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Initiate a job at a designated point in time / last day of the week / month etc.

Post by freddyp »

In that case look at the OUTGOING connection of "Hold job". It has the same properties as the flow.
Arthur
Member
Posts: 113
Joined: Sat Sep 09, 2017 11:58 pm
Location: Yateley, UK

Re: Initiate a job at a designated point in time / last day of the week / month etc.

Post 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 :)
Post Reply