Creating timer job from workflow

I have a requirement such that when a workflow starts on a list item I need to send out an email at a regular intervals until that list item changes state and thus the workflow changes state.

I have figured out how to create a custom timer job but I was thinking about having one instance of the timer job for each instance of the workflow. I get the following error when I call the update() method of the timer job:

Access denied.
at Microsoft.SharePoint.Administration.SPPersistedObject.Update()
at Microsoft.SharePoint.Administration.SPJobDefinition.Update()
at Pointbridge.HelpDesk.HelpDeskWorkflow.createEmailTimerJob(Int32 interval)
at Pointbridge.HelpDesk.HelpDeskWorkflow.helpDeskWorkflowActivated(Object sender, ExternalDataEventArgs e)

My guess is that the app pool account isn't a farm admin account. Is the solution as simple as making the app pool account a farm admin? I'm not sure this will work in high security environments.

Is there any other way in SharePoint to satisfy the requirement for sending out an email at a regular interval? Do I really need a separate timer object for each workflow instance?

[1175 byte] By [MichaelGe] at [2008-1-1]
# 1

Try creating a loop in the workflow, that include a 'send mail' activity and 'wait' activity for the duration you want. Include a check condition as well that look for a list column value, upon the value change, exit from the loop and proceed to next activity.

-Praveen

Pravi4u at 2007-9-7 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Development and Programming...

SharePoint Products and Technologies

Site Classified