Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Running tasks at ABP startup #5250


User avatar
0
hitaspdotnet created

How can you running a task at startup time when your task comes from a plugin? I have a plugin with special tasks and I want complete them before application module initializing but from a plugin in release mode. If I marking my task classes with an interface like IStartupTask then how can I completing tasks with this marker at startup time after *.Core module before *.Application module. I think it's can be done with a class registrar in PreInitialize method of Application module but i don't know how to do :(


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I'm not sure if it works but you can try to use collection resolver to resolve all implementations of IStartupTaks, <a class="postlink" href="https://github.com/castleproject/Windsor/blob/master/docs/resolvers.md#collectionresolver">https://github.com/castleproject/Windso ... onresolver</a>.

    Then, you can execute all of them in a foreach loop.