Try our conversational search powered by Generative AI!

Create Schedule job to move page from one folder to other

Vote:
 

I have a page in episerver Edit mode..i want to move that page to a different folder if the page is 6 months older..i want to create a schedule job for the same.

But i am not sure how to get the location of the source page(the page which is in edit mode)

#148320
May 10, 2016 9:26
Vote:
 

You can hover over the page in edit mode and you will see the ID of it. 

For the scheduled job, create a content reference based on the id. 

Use IContentRepository to move page(s) (remember that you will need to impersonate a user if you want to move pages. Scheduled job runs as anon user when run automatically)...Not that you asked for it but that will likely be your next error to solve :)

PrincipalInfo.CurrentPrincipal = PrincipalInfo.CreatePrincipal("system.user");



#148326
Edited, May 10, 2016 10:37
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.