Scheduled tasks failed to run

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • John.Ross
    Senior Member
    • Jan 2003
    • 406
    • 5.7.5

    Scheduled tasks failed to run

    I am having some issue running scheduled tasks. I have one mod installed, it does not involv edits to an vb files.

    The mod is not the issue though.

    I set the task to run on a schedule every 10 minutes. I can then say 'run now' and the script runs. If I exit the panel and look at the 'schedule' it will then say time is curently 10.24pm but the next scheduled time to run the script is 11.10pm?? a bit more than than 10 minutes.

    Is there any known issues with the task scheduler? I found one in the bug tracker but it was related to the mail queue.

    See attached images (sorry for delay between task and screen shot)

    The task is gateway but you can see it on other tasks as well
    Attached Files
    Thanks In Advance

    John
  • Scott MacVicar
    Former vBulletin Developer
    • Dec 2000
    • 13286

    #2
    Thats 10 past the hour not every ten minutes.
    Scott MacVicar

    My Blog | Twitter

    Comment

    • Scott MacVicar
      Former vBulletin Developer
      • Dec 2000
      • 13286

      #3
      Just thought I'd add there isn't a way to do multiple tasks at the moment but I'd hope we'll be able to support the running of tasks at various by times by seperating them by commas just like what is done with an actual cron job.
      Scott MacVicar

      My Blog | Twitter

      Comment

      • John.Ross
        Senior Member
        • Jan 2003
        • 406
        • 5.7.5

        #4
        Scott

        Ok, that makes sense, I looked up the help text and it does not say this in any clear way unless you have this peice of knowledge in advance.

        The expected behaviour if you set for 10 mins would be every 10 mins.

        So can it be run every 10 or 15 mins?
        Or is the minum period 1 hour? (as 1 min is ridiculous)

        Is it a case of setting all other options to 0?

        Also the task seems not to have been executed even at 11.10pm and it does not appear in the logs as having ben executed. If I hit run now it will execute
        Attached Files
        Thanks In Advance

        John

        Comment

        • John.Ross
          Senior Member
          • Jan 2003
          • 406
          • 5.7.5

          #5
          Originally posted by Scott MacVicar
          Just thought I'd add there isn't a way to do multiple tasks at the moment but I'd hope we'll be able to support the running of tasks at various by times by seperating them by commas just like what is done with an actual cron job.
          Damn

          does that mean I can only pick one task to run on a schedule?

          Or does it mean the task shall only execute once? at the scheduled time?
          Thanks In Advance

          John

          Comment

          • John.Ross
            Senior Member
            • Jan 2003
            • 406
            • 5.7.5

            #6
            Scott

            I give up for now, Ive added a cron job on the server to run the script directly once per hour and removed it from the task scheduler.

            Any improvements in this area for 3.0.2 ?
            Thanks In Advance

            John

            Comment

            • Scott MacVicar
              Former vBulletin Developer
              • Dec 2000
              • 13286

              #7
              It means you'd have to enter 6 tasks to get it to run every 10 minutes. Though it only works when your board is actually active as it runs when hits to the site occur.

              There isn't any improvements planned for 3.0.2 though I think its already on the list for 3.1 in the suggestions forum.

              It works like a cronjob where you specify the
              day, hour, minute its to run on.

              From the admin help
              The columns across the top are:
              m: (Minute) This is the minute that a task runs. If this is an asterisk it runs every minute.

              Do you still have $cronimage in your footer?
              Scott MacVicar

              My Blog | Twitter

              Comment

              • John.Ross
                Senior Member
                • Jan 2003
                • 406
                • 5.7.5

                #8
                Scott

                It was a fresh installation of a test forum, it is not running on a live forum. The installation is completely 'vanilla' flavour, no edits. I just did not want to chance moving it to a live forum or database until I was happy.

                So $cronimage should be there.

                I set a single task running last night and it does not appear in the logs today, and has not run, even although I told it to log it but it has rescheduled.

                Hitting 'Run Now' or typing the direct path in the browser works every time.
                Thanks In Advance

                John

                Comment

                • Scott MacVicar
                  Former vBulletin Developer
                  • Dec 2000
                  • 13286

                  #9
                  Ah the system relies on hits being made to the front part of the forum to run tasks.
                  Scott MacVicar

                  My Blog | Twitter

                  Comment

                  • John.Ross
                    Senior Member
                    • Jan 2003
                    • 406
                    • 5.7.5

                    #10
                    So the timer part of the schedule is based on site hits and not system time?
                    Thanks In Advance

                    John

                    Comment

                    • Scott MacVicar
                      Former vBulletin Developer
                      • Dec 2000
                      • 13286

                      #11
                      Well it needs hits on the frontend to activate it.

                      Its basically a pseudo scheduled task system since not all users have enough privledges to add scheduled tasks in windows or add something to crontab under unix / linux.

                      So the only thing left to do is to run it when users visit the site at the specified time and since all of the tasks are dependant on user activity its an appropriate system.
                      Scott MacVicar

                      My Blog | Twitter

                      Comment

                      • John.Ross
                        Senior Member
                        • Jan 2003
                        • 406
                        • 5.7.5

                        #12
                        Scott

                        So is that any user hit? Or users login with privelages (mod or admin?)

                        What does it do, count hits? or is the fucntion to check task scheduled time against system time included in a loop used to generate the content output for site visitors? and so just need a visitor or refresh to check it?

                        If this is the case I would assume a visitor would be needed at the same time as the job is scheduled (or very close) or the job wont run?

                        I am back to looking at it again as I just found out theat vDecks cron scheduler has a bug in it, so it will not run either (just my damned luck!)
                        Thanks In Advance

                        John

                        Comment

                        • Hype
                          Member
                          • Apr 2003
                          • 48

                          #13
                          I believe I am having the same problem...

                          But after reading this...it all makes sense..

                          This scheduled task is not trully a cron job.

                          There is not a system timer kicking it in.

                          But when a user hits any of the non-mo/admin pages...one of the things that happens (I am going to guess here) is that a function kicks off a file that looks to see if there is a scheduled job for that moment.

                          If it is, it runs it, if not, then nothing happens.

                          This makes sense to me, because I upgraded, and have the board clkosed to users while I rebuild the search index...
                          Hence its not getting hit on the front end, the scheduled jobs are not getting run...

                          Is this true?
                          From what I read, this all makes sense to me now.

                          Comment

                          • Steve Machol
                            Former Customer Support Manager
                            • Jul 2000
                            • 154488

                            #14
                            The scheduled tasks are triggered by the $cronimage function oin your foooter template. If you remove this from your footer, they won't run. If you have a slow board, then they won't be triggered until someone accesses your forums.
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment

                            Related Topics

                            Collapse

                            Working...