3 Replies Latest reply on Oct 12, 2020 2:36 AM by Seema Yaligar

    schedule workflow daily and each task one by one day

    shashank mishra Seasoned Veteran

      i want to schedule my workflow(wf_abc) with 2,5,10 or any number n sessions present. lets take 5 s1,s2,s3,s4,s5

      requirement in that i want my workflow(wf_abc) daily but one task one day i.e today s1 then on next day s2 then next s3 on day after..same way

       

      Please help us achieve this

        • 1. Re: schedule workflow daily and each task one by one day
          Nico Heinze Guru

          As you haven't written whether you're asking for PowerCenter or the Informatica platform, I assume you ask for PowerCenter (as there are no sessions in the platform).

           

          I wouldn't try to schedule this using any built-in tool (at least I can't see at this moment how this would work).

           

          What I would do is to build some process (maybe a mapping) which retrieves the structure of the workflow "on the fly".

          Next this process needs to have a persistent variable which stores the number of the session which was executed last.

          Now after having analysed the current structure of the workflow (I assume that all sessions are connected in sequence, no parallel flows, no branches), you can simply count through the current number of sessions and select the n-th one (n being the number for "today").

          Finally using this information, you can issue a "pmcmd starttask" with the name of the n-th session.

          And of course you have to increment the internal variable.

           

          Does that make sense to you? If not, why not?

           

          And, ouf ot curiosity, what exactly do you want to achieve?

           

          Regards,

          Nico

          • 2. Re: schedule workflow daily and each task one by one day
            JanLeendert Wijkhuijs Active Member

            Hi Shashank,

            Do you still encounter your problem?


            There is a way to achieve what you require.
            You can use a dummy session prior to the s1, s2 etc. so ds1, ds2...
            In this dummy you can have a sql override like which fires a query

            select distinct 1

            from [table_name]

            where datepart(dw,getdate()) = 2 (or 3 or 4)

            On the link from the ds1 to s1 you would need to configure $s_dummy1.SrcSuccessRows > 0

            Hope this helps

             

            Regards,

            JanLeendert

            • 3. Re: schedule workflow daily and each task one by one day
              Seema Yaligar Seasoned Veteran

              Hi Shashank,

              Also you can use pmcmd StartTask command to start a session. Make a script at OS level using this command to schedule each task everyday.

               

              You can refer the Command reference guide  > pmcmd command > StartTask for more information.

               

              Thanks,

              Seema