I have a scheduled task that runs every night that makes data updates to many pages on my site. Of course because of those updates, the next day there are hundreds of staging tasks waiting to be synced. Is there a way in my scheduled task to stop it from creating a staging task for the updates I'm making? I'm using 10.0.51
Yes, you can use a custom CMS Action Context, the code within will be in that context:
using(CMSActionContext context = new CMSActionContext() { LogSynchronization = false }) { // Code here will not log synchronization tasks }
Thanks Trevor! Worked like a charm!
Here is the exact syntax that worked for me in case anyone is looking for it.
using (new CMSActionContext() { LogSynchronization = false }) { //Some code... }
Please, sign in to be able to submit a new answer.