Jump to content

Scheduled tasks don't run if you manually run them


pcm2a

Recommended Posts

I noticed that last night two scheduled tasks did not run:

Refresh Guide scheduled 4:30am, last actual run around 11pm by me (manual kick off)

Roku thumbnail plugin scheduled 5:00am, last actual run at 12am by me (manual kick off)

 

Is there some logic in there that says if I manually run the task within X hours then skip the automatic job? If so what is X.

Link to comment
Share on other sites

I was assuming scheduled jobs would always run at their scheduled time, regardless of when it might have manually kicked started. Example: My guide data isn't ready to be updated until early in the morning so I have the job set at 4am. I manually ran it doing some tests at 11pm, it didn't run at scheduled 4am and I didn't get the latest guide until I did it manually this morning.

 

The server dashboard tells me the last time the job ran. 12 hours ago was when I kicked off the roku job manually. The scheduled job should have ran at 5:00 am. I also checked the logs and it did not run.

 

5c81701e13354_ScreenShot20190307at12450P5c817038745bc_ScreenShot20190307at12530P

Edited by pcm2a
Link to comment
Share on other sites

Yes it will run, unless it was still going at that time, or your server was off or asleep.

Link to comment
Share on other sites

My guide refresh has ran consistently every day at that time, except for today where I had ran the task 5 hours prior. My Synology is never off and if power went out and the backup died it is not set to come on automatically.

 

Tonight I will try the following:

1. Won't run guide at 11pm (but I did run it this morning manually)

2. See if it runs Friday

3. Tomorrow will run the guide at 11pm

4. See if it runs on Saturday

 

That should confirm if there is something in place that keeps the job from running if it ran soon.

Link to comment
Share on other sites

I have figured out the issue but not a solution yet. The docker container that Emby is running in is using UTC timezone instead of the Synology CST system time. The scheduled jobs are kicking off at exactly the right time...in UTC.

/ # date
Fri Mar  8 17:00:33 UTC 2019

root@ds216:/# date
Fri Mar  8 11:00:54 CST 2019

How do we know that it ran at the UTC time you ask? I have a few answers for that:

 

1. In the emby logs the refresh guide kicked off at exactly 04:30.

2019-03-08 04:30:00.000 Info TaskManager: DailyTrigger fired for task: Refresh Guide
2019-03-08 04:30:00.000 Info TaskManager: Queueing task RefreshChannelsScheduledTask
2019-03-08 04:30:00.000 Info TaskManager: Executing Refresh Guide

2. In the dashboard you can see that it ran 12 hours ago which is 4:30am CST - 6 hours. The time adds up.

 

5c82a4ba9b99d_ScreenShot20190308at112102

 

3. I added a few extra channels into my channel list and guide as a test. If it would have ran at 4:30 am CST these would have been in there. 6 hours earlier they would not. The extra channels were not imported because it ran 6 hours "early".

 

So this means that Emby is using the Synology system time for guide/tv data but the scheduled jobs are using the docker containers time. I haven't figured out yet how to set the timezone.

 

Emby has the right time in the guide:

5c82a3f84b852_ScreenShot20190308at111820

 

I tried setting the timezone variable in the docker container properties but it had no effect.

 

5c82a41077690_ScreenShot20190308at111855

Edited by pcm2a
Link to comment
Share on other sites

One thing to keep in mind in case this is adding a wrinkle, we are not actively testing Docker on Synology. Our native Synology package is the preferred install method there. Thanks.

Link to comment
Share on other sites

I would agree with this except for the fact the native Synology package ran terribly slow on my DS216+. So slow that I was testing using a separate laptop for Emby or abandoning it altogether. At someone else's suggestion I installed the beta in a docker container and it runs great.

 

Am I able to run the latest beta version as a native Synology package?

Link to comment
Share on other sites

solabc16

Hello @@pcm2a

 

Did you get to the bottom of or understand the reason for this "I would agree with this except for the fact the native Synology package ran terribly slow on my DS216+."

 

That's certainly not normal or typical.

 

Best

- James

Link to comment
Share on other sites

No I was not able to get to the bottom the slowness. Scanning my m3u would take an hour, general web app navigation was painfully slow, shows would fail to record. Ram and cpu was barely used. This is what I found in various testing:

 

Synology DS216+, Emby stable -> Slow

Synology DS216+, Docker Emby beta -> Normal speed (this is what I have been running)

Synology DS216+, Emby beta -> Normal speed (just installed today so still testing)

Dell laptop with Ubuntu, Emby stable -> Normal speed

Link to comment
Share on other sites

solabc16

Ok, thanks @@pcm2a - so the 'problem' appeared to be with the latest stable as a native package; at least as far as testing so far has proven.

 

Best

- James

Link to comment
Share on other sites

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...