Announcement

Collapse
No announcement yet.

A question on Task Manager and Daily Statistics

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • A question on Task Manager and Daily Statistics

    I have a question on the settings used in the Scheduled Task Manager.
    From what I understand of the settings my Daily Statistics Updated setting is for the task to run daily at midnight, yet it runs at 3 P.M., why is that?

    Click image for larger version

Name:	Daily-Stats-Log.jpg
Views:	34
Size:	71.9 KB
ID:	4399815

    And not always at 3 P.M.

    ID Action Date Info
    74997 Daily Statistics Log 16:44, 4th Oct 2018 Daily Statistics Updated
    74968 Daily Statistics Log 15:24, 3rd Oct 2018 Daily Statistics Updated
    74928 Daily Statistics Log 15:01, 2nd Oct 2018 Daily Statistics Updated
    74890 Daily Statistics Log 15:32, 1st Oct 2018 Daily Statistics Updated
    74855 Daily Statistics Log 16:22, 30th Sep 2018 Daily Statistics Updated
    74828 Daily Statistics Log 17:29, 29th Sep 2018 Daily Statistics Updated
    74802 Daily Statistics Log 18:36, 28th Sep 2018 Daily Statistics Updated
    74770 Daily Statistics Log 15:31, 27th Sep 2018 Daily Statistics Updated
    74729 Daily Statistics Log 15:28, 26th Sep 2018 Daily Statistics Updated

    At almost 8:20 A.M. 10/5 the User Activity Statistics only showed stats to 10/3, why the 1 day lag time?

    Click image for larger version

Name:	Stats-log-2.jpg
Views:	43
Size:	175.1 KB
ID:	4399814

  • #2
    Scheduled Tasks are triggered by page visits. If no one is visiting your site, then no tasks are executed. They are just queued until someone visits your site. For each page load, the task that's on top of the queue and is scheduled to be run (based on current time) is executed. That explains the delay.

    There is a way to trigger the scheduled tasks from the server crontab (if your hosts allows it) which can be scheduled to run every X minutes. There's a cron PHP file from do_not_upload folder. There's an instruction inside the file on how to use it.

    GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

    Comment


    • #3
      Originally posted by Glenn Vergara View Post
      Scheduled Tasks are triggered by page visits. If no one is visiting your site, then no tasks are executed. They are just queued until someone visits your site. For each page load, the task that's on top of the queue and is scheduled to be run (based on current time) is executed. That explains the delay.

      There is a way to trigger the scheduled tasks from the server crontab (if your hosts allows it) which can be scheduled to run every X minutes. There's a cron PHP file from do_not_upload folder. There's an instruction inside the file on how to use it.
      Your answer does not make sense Glen.
      Okay people are visiting our site every day, so as you can see from the task log details a task scheduled to be run at midnight is being run at 3:00 P.M., why?
      Every day the User Activity Stats seem to be a day behind, why?

      Comment


      • #4
        Originally posted by CorbinH View Post
        Every day the User Activity Stats seem to be a day behind, why?
        Because other Scheduled Tasks run more often. The system will run exactly 1 task every five minutes per user per visit. If 11 users visit the site each day, then 11 tasks will be run unless they spend more than 5 minutes loading pages. The rest have to wait until more users visit. The times are guidelines, that is when they are added to the queue if they can't run. An estimated time it will run is calculated and displayed. If it is supposed to run at midnight and doesn't run until 3 am, then there is a three-hour backlog on the scheduled tasks. None of these tasks are considered critical so they are delayed to provide a better experience to the end-user.

        If you want the schedule to run closer to its default, use the vbcron.php file in the do_not_upload folder. This runs from the command line of your server and you can trigger it with crontab or Windows Scheduled Tasks every minute (or 5 if that is the lowest your host allows) and it will run the schedule tasks on the proper schedule.
        Last edited by Wayne Luke; Fri 5 Oct '18, 9:37am.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment


        • #5
          I may not have explained it clearly but let me try a store analogy.

          Imagine you are in a queue in a store to pickup an item you purchased online. Even if you are scheduled to pickup the item at say 12pm and you are at the store at that time, you can't still pickup your item if you have another person in front of you. The store staff processes store pickups one customer at a time. You have to wait for your turn. That is also the case for Scheduled Tasks, a task needs to be on top of the queue (aside from reaching or exceeding the scheduled time) in order for it to be processed.

          GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

          Comment


          • #6
            Thanks guys.

            Comment


            • #7
              Next question.
              If I look in the Scheduled Task Log and see that Scheduled Unattended Publish has never been run does that mean I can remove it from the Scheduled Task Manager without any Detrimental effect on the running of the forum?

              Comment


              • #8
                Do you use Articles and save them for future publishing? If so, then you need to leave it available.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API - Full / Mobile
                Vote for your favorite feature requests and the bugs you want to see fixed.

                Comment


                • CorbinH
                  CorbinH commented
                  Editing a comment
                  We do not use Articles on our Forum.

              • #9
                Originally posted by Wayne Luke View Post

                Because other Scheduled Tasks run more often. The system will run exactly 1 task every five minutes per user per visit. If 11 users visit the site each day, then 11 tasks will be run unless they spend more than 5 minutes loading pages. The rest have to wait until more users visit. The times are guidelines, that is when they are added to the queue if they can't run. An estimated time it will run is calculated and displayed. If it is supposed to run at midnight and doesn't run until 3 am, then there is a three-hour backlog on the scheduled tasks. None of these tasks are considered critical so they are delayed to provide a better experience to the end-user.

                If you want the schedule to run closer to its default, use the vbcron.php file in the do_not_upload folder. This runs from the command line of your server and you can trigger it with crontab or Windows Scheduled Tasks every minute (or 5 if that is the lowest your host allows) and it will run the schedule tasks on the proper schedule.
                I still don't quite understand why the highlighted actions are set to run 16 hours after the scheduled time.
                to use an analogy similar to Glen's it's a bit like making an appointment to see the doctor at 12:00 midnight and not seeing him until 4:00 in the afternoon. What is the point of being able to set a task to run at a specific time if it is dependent on other tasks being run first?

                Click image for larger version

Name:	STM.jpg
Views:	35
Size:	169.0 KB
ID:	4400046
                Last edited by CorbinH; Mon 8 Oct '18, 1:09pm.

                Comment


                • #10
                  If everything ran exactly when it is scheduled it would cause a lot of economy servers to lock up. Since most vBulletin customers aren't using high level VPN or dedicated servers it's intelligent design to prioritize and stagger scheduled tasks.

                  Comment


                  • #11
                    If you trigger the scheduled tasks from server crontab as Wayne and I suggested, then it will minimize the waiting time. This is not dependent on user visits. You can schedule the crontab to trigger scheduled tasks every 5 minutes or whatever lowest time your host allows.

                    GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

                    Comment


                    • #12
                      Originally posted by CorbinH View Post
                      What is the point of being able to set a task to run at a specific time if it is dependent on other tasks being run first?
                      It is done this way so if there is a break in visits the first user to visit your page doesn't have a 30 minute page load while all the tasks run.

                      The fix to your issue has been provided. You want to use the vbcron.php file and set it to your server's crontab to run every 1 to 5 minutes. Then your tasks shouldn't get behind. However, as I also said, none of these tasks are considered critical or they would be achieved by different means.

                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud demonstration site.
                      vBulletin 5 API - Full / Mobile
                      Vote for your favorite feature requests and the bugs you want to see fixed.

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...
                      X