I have an Event Receiver
that is attached to some change in a item list. This event receiver does things that consumes a lot of procedure. I want to run it under the process OWSTIMER.EXE
and not W3WP.EXE
, it seems that in Sharepoint 2013
the events receivers run under W3WP.EXE
. I found this question because I wanted to do the same, but nobody answers.
Because of that problem with the different process that I want to run under, I created a TimerJob
this way that looks at the items on my list and does the same thing that before did the first event receiver. This is working, and is running under OWSTIMER.EXE
the way I want.
Now, the thing I want to do is, execute that TimerJob from my old event receiver (not the one I create to run this timerJob, like in the example), just because this list is not going to change frequently, and I want the process running, when it changes.
(The thing I want, is hacking SharePoint
to run an Event Receiver
in OWSTIME.EXE
)
Can I do that?
Thanks in advance.
in the example, the event receiver:
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPWebApplication parentWebApp = (SPWebApplication)properties.Feature.Parent;
SPSite site = properties.Feature.Parent as SPSite;
DeleteExistingJob(JobName, parentWebApp);
CreateJob(parentWebApp);
});
}
catch (Exception ex)
{
throw ex;
}
}
my Event Receiver
(that run onther w3wp.exe
):
public override void ItemUpdated(SPItemEventProperties properties)
{
base.ItemAdded(properties);
//here it does the same that do the Timer Job(but with that item)
//here I want to execute my TimerJob. This is possible?
}