Scheduled tasks always fail

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
Post Reply
delphimon

Posts: 5
Joined: Thu Jan 30, 2020 10:43 pm
Location:

HTPC Specs: Show details

Scheduled tasks always fail

#1

Post by delphimon » Fri Oct 23, 2020 8:54 pm

OK, I've tried my best to figure this one out on my own, but I'm stumped. After a long time of working perfectly, for the past N months my scheduled tasks no longer complete successfully. If I manually launch and run EPG123 and hit the "Save & Execute" button, the update task works just fine, and my guide is updated. However when the scheduled task runs overnight, it fails 100% of the time with an error that it couldn't receive a token from SD.

Code: Select all

[10/23/2020 2:00:02 AM] ===============================================================================
[10/23/2020 2:00:02 AM]  Beginning epg123 update execution. version 1.4.10.10
[10/23/2020 2:00:02 AM] ===============================================================================
[10/23/2020 2:00:02 AM] [ INFO] Beginning EPG123 update execution. 2020-10-23 09:00:02Z
[10/23/2020 2:00:02 AM] [ INFO] DaysToDownload: 21 , TheTVDBNumbers : True , PrefixEpisodeTitle: True , PrefixEpisodeDescription : True , AppendEpisodeDesc: True , OADOverride : True , TMDbCoverArt: True , IncludeSDLogos : True , AutoAddNew: True , CreateXmltv: False , ModernMediaUiPlusSupport: False
[10/23/2020 2:00:06 AM] [ INFO] SD API WebException Thrown. Message: The operation has timed out , Status: Timeout . Trying again.
[10/23/2020 2:00:06 AM] [ERROR] Failed to complete request. Exiting
[10/23/2020 2:00:06 AM] [ERROR] Did not receive a response from Schedules Direct for a token request.
[10/23/2020 2:00:06 AM] [ERROR] Failed to retrieve token from Schedules Direct. message: Did not receive a response from Schedules Direct for a token request.
[10/23/2020 2:00:06 AM] [ INFO] epg123 update execution time was 00:00:03.9002610.
[10/23/2020 2:00:07 AM] ===============================================================================
Right now I'm reduced to every few days having to drop into Windows (I'm running 8.1) and manually updating EPG123 to get the guide listings updated, but it is more than a little frustrating. I've tried deleting and recreating the scheduled taks many times, to no avail. Any ideas?

Thanks

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#2

Post by garyan2 » Fri Oct 23, 2020 9:19 pm

Sounds like a permission problem, or a network problem. You can edit the user of the task in Task Scheduler to be your user account. The current user of the task should be SYSTEM, and that should work as-is, but you can give it a shot to change the user. Don't forget to store the password if the user has one.

Does your system go to sleep prior to the scheduled task is to run? If the network isn't up and running when epg123 tries to run, it might fail like this. In which case, you can change the task conditions to require a network to be available.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

delphimon

Posts: 5
Joined: Thu Jan 30, 2020 10:43 pm
Location:

HTPC Specs: Show details

#3

Post by delphimon » Fri Oct 23, 2020 9:55 pm

Hi Gary, thanks for the quick response, and sorry I didn't add more color to the initial post.

I've tried going in and manually editing the scheduled task from the default SYSTEM user to be the same user that is logged in normally for WMC (including saving the password) and no luck on that. I continue to get the same errors every night.

This is a dedicated WMC machine (an Intel NUC 5th gen) and I've set it to never go to sleep since it is the primary TV interface for the house. So it shouldn't be a wake-up issue.

Just not sure how I can even do more troubleshooting on it.

Thanks

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#4

Post by garyan2 » Fri Oct 23, 2020 10:06 pm

If you right-click the tray icon and select 'Update Guide Now", does it work?
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

delphimon

Posts: 5
Joined: Thu Jan 30, 2020 10:43 pm
Location:

HTPC Specs: Show details

#5

Post by delphimon » Fri Oct 23, 2020 10:15 pm

So it says it succeeded, but when I go to the log, it shows the same error as above from updating through the tray icon. It only works if I actually open the EPG123.exe program.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#6

Post by garyan2 » Fri Oct 23, 2020 10:26 pm

Well, at least that is consistent. The "Update Guide Now" simply calls up the scheduled task. So it's not a trigger thing or a condition thing. You've pretty much covered the permission aspect. Other than something being wrong with your OS Task Scheduler, I'm out of ideas.

I would think if it was a firewall or AV issue, it would fail manually as well.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#7

Post by garyan2 » Fri Oct 23, 2020 11:33 pm

BTW: The tray notification will say it is successful because it is based off when the MXF file's creation date/time that was imported. If it is less than 24 hours, then it will show green.

Anybody else have ideas on this one?
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

kkingsto

Posts: 77
Joined: Fri Oct 20, 2017 8:36 pm
Location:

HTPC Specs: Show details

#8

Post by kkingsto » Fri Oct 23, 2020 11:37 pm

delete and recreate scheduled task?

delphimon

Posts: 5
Joined: Thu Jan 30, 2020 10:43 pm
Location:

HTPC Specs: Show details

#9

Post by delphimon » Fri Oct 23, 2020 11:46 pm

Yeah, I've tried deleting and recreating the task to no end... unfortunately nothing works. Kicking it off by hand in the Task Scheduler interface also gives same error. I'm trying to figure out how the heck to debug why the scheduled task can't seem to make the connection to SD.

User avatar
Gripweed

Posts: 132
Joined: Sun Feb 03, 2013 6:35 pm
Location: Scranton,PA_USA

HTPC Specs: Show details

#10

Post by Gripweed » Sat Oct 24, 2020 12:56 am

When I was having trouble with the mcupdate task previously I changed my user/group to Administrators and that fixed it. Gary said that I shouldn't have to do that and that System was the correct entry but Administrators was the only thing that worked for me. I also made sure that the "highest privileges" checkbox was checked, too. Your mileage may vary. It's worth a shot though.

Post Reply