Jump to content

Scheduled tasks not respecting "Time Limit"


Recommended Posts

Gilgamesh_48
Posted

I have a scheduled task that starts the Roku "Create thumbnails" task at 01:00 and has a set "time limit" of 6 hours. The task starts on time but never stops once started unless I manually stop it.

 

While I can manually stop the task It would be a LOT better if it would honor the "time limit" setting.

 

Is there anything I can do to make this work correctly?

Posted

It does honor the time limit, but it's not an abrupt stop. The task receives a command to cancel and then it stops at a safe stopping point. If it's in the middle of an extraction it will wait for it to finish. Thanks.

Gilgamesh_48
Posted

It does honor the time limit, but it's not an abrupt stop. The task receives a command to cancel and then it stops at a safe stopping point. If it's in the middle of an extraction it will wait for it to finish. Thanks.

 

Let's see, the task starts at 01:00 in the morning with a 5 hour limit which means that the stop command should be issued at 07:00. This morning it was still running at 10:00 and yesterday it was still running at 15:00. That seems to be taking an extra long time to stop.

 

When I issue the stop command manually it has never taken longer than 2 minutes.

 

From this it seems that the task is just not stopping when asked.

 

As a point of info I have noticed the happening on the earlier stable software and under beta 4.0.0.0 and 4.0.0.1 and now on the stable 4.0.0.2. It is happening on two different servers. Both run Windows 10 with all the latest updates.

Gilgamesh_48
Posted

We'd have to look at an example. How to report a problem. Thanks.

 

I figured that you would need logs but I decided to wait since this might be a known issue because it is happening on two different servers and has been happening through several iterations of the server software.

 

Latest logs from midnight to about now is attached.

 

EmbyLogFile_2019_01_19.txt

Posted

Can you show a screenshot of your roku scheduled task triggers? thanks.

Gilgamesh_48
Posted

Can you show a screenshot of your roku scheduled task triggers? thanks.

post-21200-0-07197800-1547820036_thumb.jpg

 

I only have the one task trigger.

Gilgamesh_48
Posted

Is there any chance that this has been diagnosed?

 

The abnormal behavior is not really impacting much of anything. Before 4.0.0.2 the thumbnail creation was pushing my processor to 97-100% and my fan was running almost all the time but since I downloaded and installed 4.0.0.2 (I had the beta 4.0.0.1 before) the processor is only using 50-75% of my processor and the cooling event does not seem to be kicking in at all.

 

I know 4.0.0.1 and 4.0.0.2 are supposed to be identical but I do see a difference. Of course there has also been an update to the Roku thumbnails plugin and that is probably where the difference really is.

 

I am curious more than concerned but I do want to avoid the cat's fate.

Posted

I would suggest editing and re-saving the time limit value. Please see if that helps. Thanks.

Gilgamesh_48
Posted

I would suggest editing and re-saving the time limit value. Please see if that helps. Thanks.

I will try that, again.

I have removed and readded the task trigger several times and it has made no difference but I will try it again as I have not tried it under 4.0.0.2 and the latest version of Roku Thumbnails.

Gilgamesh_48
Posted

I have removed and recreated the task and it is still failing to shut off as scheduled.

 

I just though I would report further but I do want to emphasize that this may be a bug but it is not what I would say is a major one. It is more of an inconvenience than any real problem.

Posted

Well we should fix it if there is a problem. @ are you seeing this?

Guest asrequested
Posted

I don't have any Roku devices.

Gilgamesh_48
Posted

Well we should fix it if there is a problem. @ are you seeing this?

 

Agreed. One thing: In normal operation the problem I am seeing should not happen as the time frame for just a few videos to have thumbnails created should be short. However this is a new install of Emby and I have a huge number of files and Emby is creating thumbnails for all of them.

Gilgamesh_48
Posted

I don't have any Roku devices.

 

I started to reply that it does not need Roku devices to create thumbnails but I realized that in Emby Roku is the only device that supports them so if you have no Rokus there is no reason to have the plugin.

Happy2Play
Posted

I don't use this plugin, but I can test. looking at the log in post 5 the task is already running and another one is queued.  Was the task from the previous day still running?

2019-01-17 01:00:00.011 Info TaskManager: Queueing task RokuScheduledTask
Happy2Play
Posted (edited)

@@Luke

 

What does this convert to ""MaxRuntimeTicks":36000000000}"?  If this is microseconds as this topic would suggest then there are 1 to many zeros as this is 10hrs not 1hr.

 

Also does running a task manually honor the time limit?

Edited by Happy2Play
  • Like 1
Gilgamesh_48
Posted

 

I don't use this plugin, but I can test. looking at the log in post 5 the task is already running and another one is queued.  Was the task from the previous day still running?

2019-01-17 01:00:00.011 Info TaskManager: Queueing task RokuScheduledTask

 

Yep. It started and I never stopped it. I did not start the task manually it just runs from whenever It starts until I stop it manually.

 

Of course once it finally processes my entire library I am quite sure it will run more normally.

 

As I believe I said earlier my server system is plenty powerful enough so that it runs fine even with the task running.

Happy2Play
Posted (edited)

Yep. It started and I never stopped it. I did not start the task manually it just runs from whenever It starts until I stop it manually.

 

Of course once it finally processes my entire library I am quite sure it will run more normally.

 

As I believe I said earlier my server system is plenty powerful enough so that it runs fine even with the task running.

 

If I am correct in  post 8, your time limit is 60hrs not 6hrs.

 

I guess as a manual test you change the custom trigger in \programdata\config\ScheduledTasks\thetaskid and drop a zero from "MaxRuntimeTicks".  You will need to restart the server and the scheduled task trigger will display a decimal time (something you can't set via the UI).  Mine current shows ".1hr" and am testing.

Edited by Happy2Play
Gilgamesh_48
Posted

If I am correct in  post 8, your time limit is 60hrs not 6hrs.

 

I guess as a manual test you change the custom trigger in \programdata\config\ScheduledTasks\thetaskid and drop a zero from "MaxRuntimeTicks".

 

I "Think" you meant post #7. But no, the screen shot shows a time limit of 6 hours.

 

It seems that what you are implying is that the scheduled task time limit is adding an extra zero. If that is the case I wonder if the error is in the way the server sets up time limits or there is an error in the plugin.

 

It should be noted that other plugins seem to be working correctly.

Happy2Play
Posted (edited)

I "Think" you meant post #7. But no, the screen shot shows a time limit of 6 hours.

 

It seems that what you are implying is that the scheduled task time limit is adding an extra zero. If that is the case I wonder if the error is in the way the server sets up time limits or there is an error in the plugin.

 

It should be noted that other plugins seem to be working correctly.

 

Sorry I missed a number, post 18.  Yes, I have not been able to convert (36000000000) to equal 1 hour.  So I dropped a zero and the test is running now, I will know in a hour if it works.

5c453982a8604_trigger.jpg

 

As noted in the other post you can only set whole number in the UI, but you can manipulate the file directly and restart the server.

Edited by Happy2Play
Happy2Play
Posted

My theory is correct and it is the trigger time itself as my modified trigger stopped after 1 hour.

Gilgamesh_48
Posted

My theory is correct and it is the trigger time itself as my modified trigger stopped after 1 hour.

 

OK. Thanks. You have verified that there is a problem and I know that there is a way to manually fix the problem on a per-task basis but is there going to be someone looking to fix the problem for the future?

 

Again thanks for looking at and identifying the problem.

Posted

Also does running a task manually honor the time limit?

 

No because the time limit is attached to each trigger, not the whole task itself.

  • Like 1

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