5 Replies Latest reply: Jan 13, 2014 10:33 AM by Jaydeep Sahoo RSS

    URGENT- Weekly task having dependency on a daily task

      I have a tricky situation here.


      There is a daily task say 'A'(runs everyday).

      There is one weekly task say 'B'(runs only on Monday) which is executed

      on success of the daily task 'A'(Only on monday ofcource).

       

      I have another task say 'C' which is a daily task and is executed on success of the daily task 'A'

       

      I used to handle this with ease in an external scheduler. But now we need to schedule this in QMC as the external scheduler is going to be decommissioned. Can anyone suggest how to schedule these 3 tasks in QMC.

        • Re: URGENT- Weekly task having dependency on a daily task
          Massimo Grossi

          Hi

          I think you could

           

          schedule every day (on success of the previous)

          Task A --> Task B --> Task C

           

          In task B add a check at the beginning of the script; if it's Monday --> exit

          • Re: URGENT- Weekly task having dependency on a daily task
            B Aydin

            Hi,

             

            This may help:

             

            1) Set "Document A" to run "Daily" (QMC-->Documents-->User Document-->Reload)

            2) Set "Document C" to run "On Event from Another Task" and select "successful" and "document A" on the right hand side.

            3) Set "Document B" to run "Weekly" but also set "dependency" to "document A", like that it will run only if "Document A" was reloaded successfully in its last run.

             

            Regards,

              • Re: URGENT- Weekly task having dependency on a daily task

                Thanks for the quick response Aydin !

                I was considering this option. But, task dependency sometimes behaves oddly.

                Can you please explain the below 2 scenarios if I follow the steps you suggested.

                 

                1. Suppose task A succeeds on ..saturday,sunday, but on monday for some reason it does not trigger (due to some dependency to any other task). In this case I beleive the task dependency you have mentioned in your 3rd point will check the last run which would be on sunday and it will trigger task B as it fill find it to be successful in the last run. But this should not trigger as task A did not trigger at all on monday.

                 

                2. Suppose I have scheduled task B on Monday at 9 AM.

                   Let task A be scheduled at 7 AM daily and usually takes 1 hour to complete.

                   If due to some reason task A takes more time (say 2.5 hours) on a monday.Here task B will check for the dependency at 9 AM but task A would be in 'executing' mode at that time. Here also I have observed task B will check the status of last run status of task A(i.e. status of sunday run). Suppose on sunday  task A was completed. Then task B will be triggered even if its dependency task would be still in 'executing' mode on monday. This should not happen.

                 

                Please correct me if I am wrong.

                Regards,

                Jaydeep