create a new task

6 days ago
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.
6 days ago
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
6 days ago
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).
5 days ago
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.
5 days ago
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?
5 days ago
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