Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If job is missed, run on startup #20

Open
Shredder5262 opened this issue Jan 24, 2021 · 10 comments
Open

If job is missed, run on startup #20

Shredder5262 opened this issue Jan 24, 2021 · 10 comments

Comments

@Shredder5262
Copy link

can this addon be altered to include If the job is missed, run at next startup? I've been working with latts9923 over on the Kodi forums to dev a script that automates theme changes which uses cronxbmc to make the change, cronxbmc works great for this...as long as kodi is running...If the timed event happens and kodi is not running (for whatever reason) the job is just simply missed and waits for the next run (which in the case of the script we're working on, a year), can this feature be added to specify during the job creation to run on next startup if missed?

@robweber
Copy link
Owner

Just posting what I had on the wiki in response to this for reference:

I guess the short answer is "yes it could probably do that". The long answer is that it would take some reconfiguring. In order to tell if something has been skipped the addon will need to keep track of a last run time for each job. On startup it would then use the last run time to find out if the next run value has been missed from the current date. Not a super complex calc by any means but since the last run time isn't currently being stored that would be the first step to completing this.

@Shredder5262
Copy link
Author

I posted this on the Kodi forum also for visibility. Without this feature the script latts and I made is pretty much unusable from my perspective. I'm not sure how to implement it myself

@robweber
Copy link
Owner

I can definitely see what you mean in terms of the missed executions in Kodi. Cron on an actual system doesn't allow for such behavior that I'm aware of; however the idea with that would be to run on a server that's on all the time. Not exactly how Kodi runs for everyone, especially if using a tablet or something.

I started implementing some pieces of this in the matrix branch but no where near done yet. I'll tag this issue when I have something ready for testing.

@Shredder5262
Copy link
Author

Shredder5262 commented Jan 26, 2021

Thank you sir, I appreciate the effort, possible to implement this for the leia version as well?

@Shredder5262
Copy link
Author

Shredder5262 commented Feb 14, 2021

Circling back to this, can you provide a progress update please?

@robweber
Copy link
Owner

I got about 50% done with this and then got held up with some other things. Hoping to finish it up soon.

robweber added a commit that referenced this issue Feb 19, 2021
@robweber
Copy link
Owner

Pretty much everything should be there now, at least in the Matrix branch. If you could test and confirm it will do what you want I can see about adding to Leia. The tests I did all worked with various combinations of turning the "run if skipped" functionality on or off, waiting for the time to pass, and starting Kodi again.

@robweber
Copy link
Owner

robweber commented Apr 7, 2021

Just hitting this again to make sure it's all working as expected. The day after my last comment Kodi 19 dropped so I'm guessing no reason for a Leia version at this point - at least that was my thought as soon as I saw that announcement. I'll leave this open for a few more days and then close out.

@Shredder5262
Copy link
Author

Hi Rob, thanks for circling back to this. I, personally, am not in a place where i can safely update to Matrix at this time. I've discovered a bunch of incompatibility in plugins i currently use that are not transferable which permits me from upgrading to 19. I would say if your option is implemented in the new version that that corrects the issue going forward so go ahead and close out as it will benefit most in the future. I have not and will not be able to test this. Until I upgrade which is an unforeseeable timeline at this time.

@robweber
Copy link
Owner

Ok, I didn't realize there were still so many plugin issues for people. I'll take another look at a Leia edition and see if I can make that happen without a lot of time invested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants