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

SiteCron jobs stop being scheduled #34

Open
adamizbekia opened this issue May 4, 2022 · 2 comments
Open

SiteCron jobs stop being scheduled #34

adamizbekia opened this issue May 4, 2022 · 2 comments

Comments

@adamizbekia
Copy link

We have been experiencing an issue with Sitecore 9.3 and SiteCron 3.2.0. We have noticed that sometimes after a job was run, all of our jobs stopped being scheduled.

What we have found out is that the issue is caused by some of our jobs changing the context language. This somehow causes the Stats fields being saved into a language version which does not exists.

And we think in that case the item saved handler will run because of the creation of the new language version and as the item changes won't contain Stats changes, it will reload the jobs while the context language is still changed. This will mean that no jobs will be loaded as even if a job has a version in that language, the Type and CRON Expression fields of the version are empty.

A restart of the site always solves the problem because during initialization the jobs load in en language.

We've discovered that making jobs fields shared mitigates the issue, but we would like to ask for opinions on this matter. What do you think would be the best way to tackle this?

Any help is much appreciated.

@adamizbekia
Copy link
Author

adamizbekia commented May 5, 2022

We were able to replicate the same with a simple job containing a SiteContextSwitcher and a Language Switcher: LanguageTestJob.zip

@asontu
Copy link

asontu commented Nov 4, 2022

You could try my SiteCron fork where the fields are Shared.

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

No branches or pull requests

2 participants