create a new task

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
один год назад
Hello there, I want to create a task. How can I do this in nopcommerce?
For example, create a task that will be run on each application start.
один год назад
To accomplish this purpose you have to create a task by implementing IStartupTask
Please check this StartUpTask from here as an example,https://github.com/nopSolutions/nopCommerce/blob/develop/src/Libraries/Nop.Core/TypeConverterRegistrationStartUpTask.cs
один год назад
Yes, it is possible to create a task in NopCommerce that will run on a certain time schedule, such as 2 hours or 1 day (30 days is maximum).
один год назад
You can run the task at regular intervals but there is no setting to run it at a specific time of day.
So if you set it for 2 days it will run more or less 2 days later after it first runs
If you set it for 12 hours it will run more or less 12 hours later after it first runs.
один год назад
Yidna wrote:
You can run the task at regular intervals but there is no setting to run it at a specific time of day.
So if you set it for 2 days it will run more or less 2 days later after it first runs
If you set it for 12 hours it will run more or less 12 hours later after it first runs.



How can I implement this in the code? Like which class and interface should I use?
один год назад
You can look at any existing task

e.g. src\Libraries\Nop.Services\Customers\DeleteGuestsTask.cs

Or In 4.6 the Nop.Plugin.Misc.Zettle plugin uses and inserts a Task in the ScheduleTask table as part of the Install
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.