ScheduleTasks

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
Hi All,

I just wanted to create my own schedule tasks as the other tasks like email sending has already been created in nopCommerce.
Could anybody please assist me with the complete process to create schedule tasks.

Regards.
Manpreet Singh
13 年 前
Hi, I've managed it by adding following lines into the web.config (section ScheduleTask, where all others scheduled tasks are located) in the NopCommerceStore directory:

<Thread seconds="N">
        <task name="Test" type="X" enabled="true" stopOnError="false" />
</Thread>

Where N is the number of seconds for repetetive running of the scheduled task and X is the name of the method (my X is for example
NopSolutions.NopCommerce.BusinessLogic.Orders.OrderTestTask, Nop.BusinessLogic
).

Then I've added the appropriate class (X) to the project, which implements ITask interface. It contains one method -
public void Execute(System.Xml.XmlNode node)
, where node param is used for passing parameters stated in web config. Do whatever you need in the body of Execute and that is it.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.