Jump to content

Scheduled tasks not following internal time?


Recommended Posts

hansolo77
Posted

This seems far fetched.. but are the scheduled tasks some how set to run at GMT or something instead of the system's time?  I've been noticing that my tasks are getting missed, and sometimes 3-4 days will go by before they are run automatically.  I've had my system on for 48 hours to run a defrag on my drives, and surprisingly the scheduled tasks ran.  However, rather than running at 11:00am (the scheduled time), they were ran 6 hours ago, which would be about 4:00am.  Why would they be running then?  This is definitely why they're being missed though, because typically my server is in standby at the time.

  • 3 weeks later...
hansolo77
Posted

Bumping this because I'm now using Version 3.0.5966.0 and this is still happening.  While I'm still boggled with the whole "server doesn't fully shutdown before trying to reload after updating" stuff in my other thread, this one is really starting to irritate me too.  I got home from work tonight and was all set to start watching a TV show on my server.  But it wouldn't start.  I checked and my server was physically running.  Then I opened up a remote desktop to discover that the Emby server icon wasn't up, and sure enough I couldn't connect the website admin page either.  So I launched server app and brought up the website.  I then, just out of curiosity, looked at my scheduled tasks page to see if my tasks had ran earlier today.  They didn't.  Well, they DID, but they didn't run when they were supposed to.  My server was on all day today because my Dad likes to watch stuff on it too while I'm at work.  So I temporarily disabled the sleep function so it would stay on.  I know for a FACT that the system was on during the time my scheduled tasks are programmed to run.  My system uptime confirms it has been on for 33 hours and 42 minutes.  My scheduled tasks are set to all run within 5 minutes of each other, starting at 11:00am.  When I look at my logs, they show some of them have not ran for more than 2 days, and others had just finished running "an hour ago".  This is completely insane.  It is 10:52pm here now.  Why would it have ran it's 11:20am schedule at 9:52'ish PM?  What's also frustrating is that I had reported this, as evident from my first post, back on April 24, but nobody even bothered to comment that it was a known issue and being looked at, or that it had even been acknowledged looking for more information.

 

I'm about ready to drop Emby and find something else.  I really don't want to, because I love how easy it is, how nice it works when it DOES work, and I've spent money on this thing.  I don't understand why it worked before and then here recently has been riddled with issues.  What's causing all my problems?  Is it because of a system update (Windows, not Emby).  Is it maybe because of some new way Emby Server is functioning to be more useful for clients that I'm not using (like Androids, or Emby Theater, etc)?  I remember posting something about it the very first time I had an issue, and had the version number in the thread.  Ever since that initial update, nothing seems to be working right.

 

What should I do guys?

Happy2Play
Posted

Tasks appear to running as scheduled on my machine.  I had a task scheduled for 7:30pm that kicked off at 7:29:59pm.

 

2016-05-11 19:29:59.8268 Info App: TimeLord :: Start :
2016-05-11 19:29:59.8268 Info App: TimeLord :: Rework Series Dates :: Start
2016-05-11 19:29:59.8424 Info App: TimeLord :: Rework Series Dates :: Count ::0
2016-05-11 19:29:59.8580 Info App: TimeLord :: Rework Episode Dates :: Start
2016-05-11 19:29:59.8580 Info App: TimeLord :: Rework Episode Dates :: Count ::5

Posted

All my scheduled tasks are running when they are scheduled to, I am using Version 3.0.5931.0  on Windows 10

 

My server has been up for 47 days, generally only reboot it when doing Windows Updates, every 2 months or so.

Posted

Hi, can you please discuss a concrete example, e.g. what task it was, what the triggers are (screenshot), and then we can go from there. thanks!

Posted

Also fyi - the server will not wake your machine to execute tasks and if it is missed it waits until the next execution. that's why i generally would suggest interval-based tasks, e.g. every 24 hours.

 

Can I also ask a question? How is it you're at the point of leaving Emby and using beta versions (pre-release) at the same time? I understand the best solution is for us to resolve the slow shutdown, and we certainly will once we've isolated the issue, but i have to ask for your feedback here. Should we just not offer betas at all? If we didn't offer betas, then you'd only be seeing this issue once a month after updates instead of once a day, and you'd probably be less aggravated. So by giving you more, are we actually hurting ourselves?

hansolo77
Posted

Sorry, I was just really frustrated last night.  I'm using betas because I'm hoping one of them will fix the issue.  I appreciate that opportunity to provide feedback on if it's been fixed.  My frustration comes from the fact that it hasn't been resolved after I've reported it many official releases prior.  It's all cool though, I had a bad day at work.  Things get to me.  It's just irritating when something that used to work fine was broken and the cause/solution seems so hard to find.

 

I will attempt to get the scheduled task log the next time the server actually runs it.  I'm aware that Emby will not wake the system up to perform tasks (maybe something could be added at a future date to enable that feature?).  So I've actually set my system to run a Task Scheduler to wake the system up 10 minutes prior to any Emby activity, and keep it running for at least an hour so it can perform those functions. 

 

Here is an edited screen shot I just made a little while ago showing my scheduled tasks, the time it's set to run, and the current time for reference as to the timing.  It's very strange.  I've not got any tasks set to run on a repeating routine (like every X hours).  So it should be occurring at the same time every day.  It's almost like it's skipping the task if the task had been run within the last 24 hours.

 

4XsoMMV.jpg

Posted

Thanks for the info. It's probably something related to standby and the triggers not getting restarted after that.

hansolo77
Posted

Ok, I can see that as a potential cause.  But if my system has been running for 40+ hours now, why is it still missing?  Is it possible it's not happening because of a new beta update?  I noticed Emby reporting there is another new version today.  Could updating it be what's causing the tasks to get ignored?  Could this be related to my other problem, where the restart process takes longer than it should and a 2nd instance is starting before the 1st has completely shut down?

Posted

is that 40 hours since resuming from standby, or 40 hours since starting emby server?

hansolo77
Posted (edited)

Since resuming from standby.  In fact.. I had rebooted the computer then disabled the Lights-Out addon I have installed that puts the computer into hibernation (My system doesn't support the S3 standby).  So you could say it's been 40 hours since powering up.  The Emby Server hasn't been running for a full day yet, since everytime I check there is a new beta update.

Edited by hansolo77
Posted

the next beta will add more logging which may help us track it down

hansolo77
Posted

Cool.  I'll post the most current log once a new scan takes place that will show the times.

Posted

Could constantly updating with betas restarting the emby app be messing with your schedule tasks? perhaps turn off auto update or run it as a service for a few days and see.

hansolo77
Posted

I don't have any auto-update.  It just comes up saying an update is available, and I have to manually install them.  As it is right now, there is another new update today, but I haven't updated it yet.  I came home from work today to see if Emby had run it's tasks..  It didn't, again.. 

 

m36ooiZ.jpg

 

Since it was suggested the problem might be because the server is asleep when the tasks should be running, I checked my LightsOut addon and verified the system was up and running during the scheduled task time..

 

dRRa3Bk.jpg

 

As evident above, the system was awake and running between 10:55am and 12:40pm.  Plenty of time for the 11:00 hour's tasks to take place.  I even experimented last night by setting a 2nd time of 12:00am (midnight) because the system wakes up at that time to perform backups of my computers.  Apparently, it missed that task too.

 

For sh!ts and giggles, here is the most recent Emby log I have.. although I doubt it'll show anything since no tasks have been run...

 

temp.txt

 

I am now going to perform the update, as Luke mentioned the new update should provide better logging.

Posted

yup, thanks for the info.

Happy2Play
Posted (edited)

That would all depend on what/when you changed the default triggers to.

 

Just tested Library scan.

5736659f0927b_trigger.jpg

 

 

Edited by Happy2Play
Posted

Just to test you could set a scheduled task to run scan media library every hour.

Posted

well i think the interval triggers are probably fine, it's the triggers for specific times that are not, and it's probably related to the server coming out of standby.

hansolo77
Posted

Agreed.. I rather not have it run every hour because the idea is to have the computer in standby when not in use (ie; when I'm at work).  I just got home and checked.. it's now up to 3 days without running any tasks.  I also, as another experiment, completely shutdown the computer and rebooted it last night and it still didn't work.  I'm installing the latest update now (to Version 3.0.5970.0).  Once that's done.. I'm going to restart the computer again, and this time disable LightsOut for 24 hours, so "waking from standby" won't be the cause.

hansolo77
Posted

I just went in and set a 1 hour interval timer on all the Library scans.  The first one (Chapter Image Extraction) actually started up on its own while I was still in the process of creating the timers for the other tasks.  The 2nd one (Clean Database) is still running, and has been for like 10 minutes, but the others haven't started yet.  I suspect they'll start up in sequence once the 2nd one finishes.  I'll report back if it doesn't.

Posted

well no, that doesn't help us. i want to learn why the daily tasks aren't firing so if you remove them then we won't be able to do that.

hansolo77
Posted (edited)

I didn't remove them.. just added a secondary timer.  Also, it does look like it went sequential, firing off the other ones after the "Clean Database" finished.  I'll remove those new timers now and see what happens.  For safe measure, I'm going to restart my computer again and start off fresh.

 

EDIT - I think I should also mention, at the top of the page it has the 3 "Application" related tasks.. Check for updates, Check for plugin updates, and Configuration backup.  "Check for updates" ran less than an hour ago, while the others have not been ran in 3 days either.  They are all set to run at 11:00am.  Strange the Update check ran, probably happened when I ran the update process..

 

EDIT 2 - Also.. I just realized I didn't have a timer set for the subtitle scan.  :rolleyes: So.. yeah.  The other Library timers are all set for 11:12am except for Clean Database which is 11:10.  Should I stagger them more?  I'm not really sure what difference it would make at this point.

Edited by hansolo77
hansolo77
Posted

Looks like the system ran it's tasks today.  Emby Server has been running since the computer was rebooted last night.  Prior to reboot, I erased all my logs to get a fresh batch.  As of right now, this is what my log folder has (I zipped them up)...

 

logs.zip

 

I looked through them, there is a LOT of Trakt errors.  Is there a problem with the plugin? 

 

Anyway, I'm going to try the test again, completely erasing all the logs, then rebooting (that makes Emby restart fresh).  I'll re-enable the LightsOut system to put the computer into standby.  Then I'll post the logs after I get home from work tomorrow.

Posted

look for log messages that contain "Daily trigger for ", and see if the times they list are correct.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...