volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Problem in Recycle bin Scheduler

There is some problem with automatic recyclebin scheduler. Its not deleting the pages from recyclebin folder. I have set the time for 7 days and mark it as active. But its not generating any error, says 0 pages deleted, Even there are lots of junk pages in EPi recyclebin folder. Please write the solution at rajan@csmails.com thanks
#12724
Jul 31, 2006 7:28
This scheduled job only removes items from the recycle bin that have been there for more than 30 days. So when your jobs runs every 7 days, it will check for items that have been there for 30 days and delete only those items.
#14788
Aug 01, 2006 0:52
can i change 30 days to 7 days somewhere.I want to cleanup the recyclebin folder everyday.
#14789
Aug 01, 2006 6:48
Hi Rajan. You can not change the number of days unfortunately, but you can write your own job that do the same as the [Automatic Emptying of Recycle Bin] in EPiServer. Use reflector and take a look at the job in EPiServer.Util.EmptyWastebasketJob: public static string Execute() { int num1 = 0; PageDataCollection collection1 = Global.EPDataFactory.GetChildren(Global.EPConfig.Wastebasket, AccessControlList.NoAccess); foreach (PageData data1 in ((IEnumerable) collection1)) { if (data1.IsDeleted && (data1.Saved <= DateTime.Now.AddDays(-30))) { try { Global.EPDataFactory.Delete(data1.PageLink, true, AccessControlList.NoAccess); num1++; continue; } catch (Exception exception1) { EmptyWastebasketJob.?.Error("17.3.1 Error when trying to delete page from recycle bin " + data1.PageLink.ToString(), exception1); continue; } } } return string.Format("{0} pages were deleted from recycle bin.", num1); } Regards. /Øyvind (Bob ;D) EPiServer Norway
#14790
Aug 01, 2006 8:25
Hi! I wonder what Epi version your code is usable for? We have 4.31 and I try to compile my project but it does not like your EmptyWastebasketJob.Error Regards Mats Norgren
#14791
Apr 03, 2007 8:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.