Friday, 3 August 2007

Starting Timer Jobs manually & Recycle Bin

I have been unable to find a way of starting (non-admin) timer jobs manually; however, you can change the default schedules.


I wanted to do this to test document deletions and prove the point to a client. For example, the job that runs against the recycle bin(s) and deletes expired items is called "job-recycle-bin-cleanup", this has a default value of "daily between 22:00:00 and 06:00:00" - you can find this information using STSADM:


STSADM -o getproperty -propertyname job-recycle-bin-cleanup -url http://server/

You can then change it to run at a more convenient time:


STSADM -o setproperty -propertyname job-recycle-bin-cleanup -propertyvalue "daily between 13:55:00 and 13:58:00" -url http://server/

Or (to update the job to run hourly):


STSADM -o setproperty -propertyname job-recycle-bin-cleanup -propertyvalue "hourly between 05 and 06" -url http://server/

The job will then run in the window specified... This saves waiting! You can update this as often as you need... Just don’t forget to change it back to the default (or other appropriate) setting!


It is worth noting that the first stage bin storage contributes towards your site size for quota purposes, the second stage % of quota is on top of the quota, so, if you had a 100MB quota and a site with 50MB in the site and 25MB in the (first stage) bin you have used 75MB of your 100MB. If you set a second stage quota at 20% you have an additional 20MB of storage (in addition to the 100MB quota) and therefore need to provision 120MB of storage for capacity planning back-end data storage for your site collections.


It is also worth noting that the first stage recycle bin does not delete/move items into the second stage if the retention period triggers the deletion (ie; the timer job deletes the document) this only occurs where a user deletes from the first stage bin. I think most SharePoint users would prefer that items deleted from the first stage bin did go into the second stage bin when expired/deleted automatically and that a retention period could be set (separate to the first stage retention period) here in combination with the % of the quota.


Furthermore, the day retention is applicable to both bins, so a document deleted out of the first stage bin by a user will have the same day retention applied (unless the quote limit is reached!) in the second stage bin... (if you see what I mean)


More RecycleBin info: