Update Guide Now Split Out Garbage Cleanup Process

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: http://epg123.garyan2.net <> Setup guide here: http://epg123.garyan2.net/downloads/epg123_Guide.pdf
Post Reply
NOYB

Posts: 111
Joined: Thu Sep 10, 2020 8:03 am
Location:

HTPC Specs: Show details

Update Guide Now Split Out Garbage Cleanup Process

#1

Post by NOYB » Wed Mar 17, 2021 2:28 am

What about splitting out garbage cleanup to it's own action item on the EPG123 task icon menu?
Reason would be not having to wait for garbage cleanup when manually doing an Update Guide Now.

User avatar
garyan2

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

HTPC Specs: Show details

#2

Post by garyan2 » Wed Mar 17, 2021 4:44 am

The 'Update Guide Now' option simply runs the scheduled task. As part of a scheduled task run, it will determine if the garbage collection needs to be run which is if the last time it ran was greater than 4.5 days ago. If it is less than that, it won't run the garbage cleanup.

If you don't want to risk that the garbage cleanup will run for a manual update, then just open the configuration GUI and click [Save & Execute]. It will run the update, but ensure that garbage cleanup does not run.
- Gary
Keeping WMC alive beyond January 2020. http://epg123.garyan2.net

Space

Posts: 2265
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#3

Post by Space » Wed Mar 17, 2021 3:58 pm

I have turned off the garbage collection done by the EPG123 task and have a separate task that runs every 5 days that explicitly does the garbage collection.

In this way, you can schedule the garbage collection to run at a time that is different than the normal EPG123 update, and it will not run when you do a "Update Guide Now" from within WMC.

To disable garbage collection in the EPG123 task, just add "-nogc" to the arguments. This task runs every day at the same time.

A separate task to just do garbage collection is: "c:\windows\ehome\mcupdate.exe -dbgc -updatetrigger". This task runs every 5 days at 4pm for me , but you can have it run at any time of day you want (that does not conflict with recordings or the EPG123 update task).

WARNING: Do NOT add the "-nogc" argument (disable garbage collection) to the EPG123 task without also adding the second task that explicitly does the garbage collection or you can end up eventually corrupting your WMC database.
Last edited by Space on Wed Mar 17, 2021 8:38 pm, edited 1 time in total.

NOYB

Posts: 111
Joined: Thu Sep 10, 2020 8:03 am
Location:

HTPC Specs: Show details

#4

Post by NOYB » Wed Mar 17, 2021 6:23 pm

Think it would be nice if the -nogc switch was passed from the task icon's "Update Guide Now" menu item and there was a separate garbage clean up menu item.

Don't mind GC taking place with the automated updates. Don't like having to wait for GC when it kicks off during a manual updating.

The problem with using the GUI config "Save & Execute" is that it doesn't run the schedule tasks. Which then misses customization scripts.

Thanks for the info.

UPDATE: Maybe a 2x the default GC schedule when running manually from the task icon.
So GC would only run during a manual update if it has been missed for multiple automated update iterations.

User avatar
garyan2

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

HTPC Specs: Show details

#5

Post by garyan2 » Wed Mar 17, 2021 7:22 pm

The client isn't aware of what it to run. It could be the task, command line, or a Save&Execute. So no 2X on the gc interval.

I will have to play around with passing the -nogc switch to the task. Not sure if it will work for tasks with multiple actions. I'm on board with looking for a way to avoid gc on the Update Guide Now button, but is not a really high priority. It is something that is useful, but again is not intended to be something used a whole lot.

Sent from my SM-G965U using Tapatalk

- Gary
Keeping WMC alive beyond January 2020. http://epg123.garyan2.net

NOYB

Posts: 111
Joined: Thu Sep 10, 2020 8:03 am
Location:

HTPC Specs: Show details

#6

Post by NOYB » Wed Mar 17, 2021 7:47 pm

I understand.

It is quite useful though when debugging something. At which time having to wait for a GC is quite annoying. For some that could be a considerable wait. Even my simple small scale system sometimes takes about 10 minutes or so.

Thanks for looking.

Perhaps passing a -gc2x switch and teach the client.
Last edited by NOYB on Wed Mar 17, 2021 8:30 pm, edited 2 times in total.

NOYB

Posts: 111
Joined: Thu Sep 10, 2020 8:03 am
Location:

HTPC Specs: Show details

#7

Post by NOYB » Wed Mar 17, 2021 8:21 pm

May have come up with an idea for a workaround.
Add the -nogc switch to the client in the epg123_update task and schedule it to never run automatically.
Add a duplicate of the epg123_update, but without the -nogc switch, and schedule it to run on schedule.

Or maybe have duplicate client tasks. One that runs GC and one that doesn't and select which one runs based on time.
Or similarly just split out the GC and run it only during certain time of day (when running at task scheduled time).

Have not attempted any of this yet. Just some workaround thoughts.

User avatar
garyan2

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

HTPC Specs: Show details

#8

Post by garyan2 » Thu Mar 18, 2021 11:39 pm

I did not find a way to pass parameters to the task, so I'm going to take an outside-the-box poor man's route. Prior to import, I will query the task for its' scheduled update time and if the current time is not TIME + XX minutes then it will be assumed to be an out-of-sequence update and GC will be disabled. That way any demanded update will not include GC.

I should be able to make this work fairly easily.
- Gary
Keeping WMC alive beyond January 2020. http://epg123.garyan2.net

NOYB

Posts: 111
Joined: Thu Sep 10, 2020 8:03 am
Location:

HTPC Specs: Show details

#9

Post by NOYB » Fri Mar 19, 2021 1:40 am

That sounds good. Looking forward to it.
I seen some info on passing arguments from event triggers but not schedule triggers or schtasks.exe.
I've been trying out the duplicate tasks (one with, one without GC) workaround. Think it would work but much nicer to have it built into the app and only have a single scheduled task.
Thanks

NOYB

Posts: 111
Joined: Thu Sep 10, 2020 8:03 am
Location:

HTPC Specs: Show details

#10

Post by NOYB » Fri Mar 19, 2021 1:52 am

Would it be a safe thing to maybe run GC anyway if it has been say 3 or 4 or so times the normal since the last GC?
But then maybe that would be kind of silly since on demand is running the same scheduled task.

NOYB

Posts: 111
Joined: Thu Sep 10, 2020 8:03 am
Location:

HTPC Specs: Show details

#11

Post by NOYB » Fri Mar 19, 2021 2:16 am

Another poor mans way might be for the task tray to set a switch file (JSON) before it launches the epg123_update task.
Then the client could query and clear/remove the switch file. This way there wouldn't be any time dependencies that could potentially exceeded in some edge case. And all present and future switches could be available for override.

User avatar
garyan2

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

HTPC Specs: Show details

#12

Post by garyan2 » Sat Mar 20, 2021 12:38 am

Not a bad idea, and is actually what I do for the buttons that require the GUIs to be restarted as administrator.
- Gary
Keeping WMC alive beyond January 2020. http://epg123.garyan2.net

Post Reply