13 Replies Latest reply on Apr 22, 2016 10:39 AM by Toby Erkson

    'Run jobs sequentially' question

    Michel Caissie

      Hi,

       

      I am in the process of installing Tableau Server and i have a question regarding the Schedules option 'Run jobs sequentially'

       

      I have the following;

       

      -One DataSource   DS1 (mySql)

      -A couple of workbooks with a data connection on DS1  and other mySql connections.

       

      Obviously i need to refresh the DataSource before the workbooks. So my first guess was to create a single schedule for everyone and select Run jobs sequentially.  But i don't know in what order the jobs are run. Can i assume that the jobs are run in the order they are added to the schedule ?

       

      thanks

       

      Michel

        • 1. Re: 'Run jobs sequentially' question
          Manussanan Sawangvareesakul

          Wanna know this too.

          Do the jobs run in the order they are added to the schedule ?

          • 2. Re: 'Run jobs sequentially' question
            Vien Hua

            Hi guys,

             

            The term "sequentially" is a bit tricky here. The jobs can run sequentially if you have multiple backgrounder processes. Each backgrounder process can only run 1 task at a time. So for example, if you have only 1 backgrounder process, setting all the jobs to run sequentially will still run one after another instead. The tasks will run in the order that they are started, taking into account the priority level as well. For example if there are two tasks pending, the one with the higher priority (lower number on the settings) will run first.

             

            Please let me know if I can clarify.

             

            Vien

            • 3. Re: 'Run jobs sequentially' question
              Toby Erkson

              Please clarify.  If there are two (or more!) tasks that all use the same schedule and have the same priority then which one fires off first?  Is it alphabetically or FIFO based on workbook created date or ???

              • 4. Re: 'Run jobs sequentially' question
                Michel Caissie

                I never found the answer to my question. I resolved it by creating 2 different schedules and by giving enough time to the Datasource schedule to finish before starting the workbook schedule. But with the number of reports growing and the time window being limited (i need to complete all the nightly queries before the database backup starts otherwise the bigger queries takes to much time and timeouts), I would like to recuperate the time between the two schedules.

                 

                Vien,

                your answer refers to the execution order of multiple Schedules, but my question is (and it is exactly what is expressed by Toby), in what order runs the different workbook refresh  within the same Schedule ?

                 

                Michel

                • 5. Re: 'Run jobs sequentially' question
                  Vien Hua

                  I did some testing on schedules that are run at the same time that has the same priority and on the same schedule. From what it looks like, it will run in the order of how the tasks appear in Admin > Tasks.

                   

                  Capture.PNG

                  If I resort this list by clicking on one of the column headers, and then selecting all and run the task now, it will run in the new order shown. At default, if I run the schedule itself on Admin > Schedules > Run Now, it'll run in the default order as seen in Admin > Tasks.

                   

                  I know this isn't a definite answer but it's what I found to be true during all my tests.

                  1 of 1 people found this helpful
                  • 6. Re: 'Run jobs sequentially' question
                    Michel Caissie

                    Vien,

                    Thanks  for doing those tests.

                    I checked on my Server and the refreshes are also done in the order they appear in the Target column.

                     

                    My goal being to reorder the default target list within the same Schedule, here is what I discover.

                    The Priority settings seems to apply at the target level  and not only at the Schedule level. So even, if it is a Schedule global setting, and the target inherit this setting when added to the Schedule, it can still be modified in the Tasks pane.

                     

                    I changed the Priority of a couple of reports in my main Schedule. I'll come back with the result tomorrow.

                     

                    Michel

                    • 7. Re: 'Run jobs sequentially' question
                      Michel Caissie

                      Here are the results of my last testing.

                       

                       

                      • First i created 3 schedules, 2 starting at the same time, the other one starting 30 minutes later, before the first two finishes.
                      • Each one have a different default priority, but each tasks in the schedule have their own priority setting.
                      • Tasks in different Schedules have overlapping priorities.

                       

                          

                      ScheduleDefault PriorityTimeTaskPriorityStartEnd
                      S1101:00 AM
                      S1T111:011:28
                      S1T221:411:58
                      S1T332:012:03
                      S1T442:052:09
                      S 2201:00 AM
                      S2T111:281:38
                      S2T221:582:01
                      S2T332:032:05
                      S2T442:092:09
                      S 3301:30 AM
                      S3T111:381:41
                      S3T252:092:10

                       

                       

                      • What i understand is that when a Schedule starts Tableau put the tasks in a Queue, ordering them by the

                            task-schedule priority.

                        • As we can see when schedule S3 started at 1:30  Task S2T1 was not completed  so Task S3T1 (priority1) was placed on top of the Queue and was next to go. So the time of the Schedule only triggers when the tasks are added to the main Queue, the order is determined by the priorities only.
                      • If two tasks from 2 different Schedules have the same priority, then the Schedule Default Priority is used
                        • As we can see all Tasks with priority 2-3-4 started from schedule S1 then S2 because  S1 have a default Priority of 10 vs 20 for S2

                       

                      • So the order in the Queue was built using the  Task-Schedule  priority
                        • Task      Priorities
                        • S1T1     1-10
                        • S2T1     1-20
                        • S3T1     1-30
                        • S1T2     2-10
                        • S2T2     2-20
                        • S1T3     3-10
                        • S2T3     3-20
                        • S1T4     4-10
                        • S2T4     4-20
                        • S3T2     5-30

                       

                       

                      Michel

                      • 8. Re: 'Run jobs sequentially' question
                        Toby Erkson

                        Nice work!

                        Michel Caissie wrote:

                         

                        ...
                        • What i understand is that when a Schedule starts Tableau put the tasks in a Queue, ordering them by the task-schedule priority.
                          • ... So the time of the Schedule only triggers when the tasks are added to the main Queue, the order is determined by the priorities only.
                        • If two tasks from 2 different Schedules have the same priority, then the Schedule Default Priority is used

                        ...

                         

                        I was having a conflict with priorities and I came to the same conclusion.  This is not what I would consider intuitive; I would've switched how the priority is used as to me that seems more correct; use the Task Priority only if there's a conflict with the default Schedule priority.

                         

                        tTaskPriority tSchedulePriority

                        task_priority schedule_priority priority faq_server

                        • 9. Re: 'Run jobs sequentially' question
                          Michel Caissie

                          Be aware that if you  re-publish a workbook,  the task priority will reset to the Schedule default priority.

                          • 10. Re: 'Run jobs sequentially' question
                            Toby Erkson

                            Oh ****!  Thanks for that info Michel

                             

                            t_server

                            • 11. Re: 'Run jobs sequentially' question
                              Jeff Strauss

                              Has anybody found a way to override the schedule default priority so that when republishing, it doesn't go back to 50?

                              • 12. Re: 'Run jobs sequentially' question
                                Rick Kunkel

                                Re original topic:

                                After publishing a lot of long-running extracts on a serial schedule in order to observe them, I strongly suspect that it’s controlled through the “serial_collection_id” column of the background_jobs table.

                                 

                                • Jobs that are part of a parallel schedule have NULL in this column
                                • Jobs that are part of a serial schedule have a number in this column.  That number corresponds to the “serial_collection_id” column from the “schedules” table.

                                 

                                I imagine that Tableau Server won’t start a job with the same serial_collection_id as one that’s already running.  I’m not sure exactly how the logic might work, however.



                                Re overriding schedule priority on republish

                                I don't know of one.  It's an excellent enhancement request.  I might even go so far as to consider it a design oversight, as most things I can think of are inherited from a previously published version of the workbook.  You can pursue an enhancement request through the Ideas forum or through Support case.