I am not sure but it might be related to HttpContext so can you please try this-
Scheduled job runs as your current user if you trigger it manually and as an anonymous user if trigger it automatically. You can set the role it uses when running automatically using the link Ravindra sent above. Very common problem.
If you have trouble falling asleep - you can read this post (https://blog.tech-fellow.net/2020/12/07/episerver-scheduled-jobs-under-the-hood/) and see what's under the hood and why it has different context when ran manually vs scheduled.
Hello all! I have this scheduled job:
Basically the purpose of the job is to find ParentPage. It has ArchiveFolder property. And to move every expired ChildPage of ParentPage into ArchiveFolder.
Job triggers by schedule successfully, but the issue is when it's triggered automatically, it ignores expired child pages, but when triggered manually - everything works as supposed to.
Any ideas why? Thank you very much!