Re the time delay - it should be fine as it is only a setting. The only consideration tho would be that the application pool would have to run continuously for the setting to really work as expected. Typically if you have no traffic on your site for a period of time, the application pool goes to sleep and therefore the scheduled task won't run / keep track of when it last run. Give it a go and monitor the recycle bin count each day if possible.
The alternative would be to take the URL string within the umbracoSettings.config and load it as a server scheduled task - this would ensure it runs each day.
The last property of the scheduled task says: Number of days an item must have been in the recycle bin before it will be deleted.
When I created a new item today, and delete it today. The scheduled task runs, and the item gets deleted, even when this parameter is 30 (stands for 30 days)
The last parameter does nothing ... I think this is a problem that is still open and has to be fixed in an update?
Version Compatibility - Checking Interval
Is your package compatible w/version 4.71?
what is the maximum no of seconds that the checking interval can be set?
We would like to set it to check once a day which is 36,000 or so.
hi Richard
Yes the code runs on 4.7.1 sites fine.
Re the time delay - it should be fine as it is only a setting. The only consideration tho would be that the application pool would have to run continuously for the setting to really work as expected. Typically if you have no traffic on your site for a period of time, the application pool goes to sleep and therefore the scheduled task won't run / keep track of when it last run. Give it a go and monitor the recycle bin count each day if possible.
The alternative would be to take the URL string within the umbracoSettings.config and load it as a server scheduled task - this would ensure it runs each day.
Cheers, Nigel
Nigel,
Thanks for the infor. I like your alternative. We will let you know how it goes.
Richard
Hi Richard
Below is some code that I have used to run server scheduled tasks. It is saved as a vbs file.
Just thought I'd share this just in case you were needing to google how to implement this solution.
Cheers
Nigel
The last property of the scheduled task says: Number of days an item must have been in the recycle bin before it will be deleted.
When I created a new item today, and delete it today. The scheduled task runs, and the item gets deleted, even when this parameter is 30 (stands for 30 days)
The last parameter does nothing ... I think this is a problem that is still open and has to be fixed in an update?
Cheers
Nicky
Hi Nicky
What you describe is something I was not aware of, and not part of this original purpose of this thread.
So, can you please post your scheduled task config setting so I can try and replicate.
Thanks, Nigel
Hi Nigel,
This is my config:
<task log="true" alias="recycleBinManager" interval="21600" url="http://localhost/base/restExtRecycleBin/DeleteItems/10/30.aspx" />
So after 6 hours this task should run, delete 10 items at time, and items must be 30 days in the trash bin.
When a new item is in the trash bin, it will be deleted. Even when it is not 30 days in the trash bin.
Thank you
Nicky
Hi Nicky
Tis a BUG - argghh.
I have corrected the code and uploaded an updated package to the project.
You can simply download the package and drop the dll files into your site - no need to install the package.
Thanks for identifiying the issue - mental note to self - test, test and test again
Cheers
Nige
Thank you, the update solved the problems!
Cheers
Nicky
is working on a reply...