Base solution for your next web application
Open Closed

Move Background Job Process to Windows Service #1238


User avatar
0
andis created

We want to move our background job process to windows service. In web application, we will let user able to enqueue a job, but all the execution process will move to a windows service. What modules will i need and how to initialize them in windows service?


3 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    1. Check this: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Background-Jobs-And-Workers#disabling-job-execution">http://www.aspnetboilerplate.com/Pages/ ... -execution</a> Disable job execution for web application.

    2. Create a Windows service and just add Abp package since this is only needed package. But if you used Hangfire, you should also add hangfire module. Windows Services are similar to console apps, there is one sample: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-samples/tree/master/PhoneBook/src/Acme.PhoneBook.ConsoleApp">https://github.com/aspnetzero/aspnet-ze ... ConsoleApp</a> Note: You should also add your application's modules like in this sample console app.

  • User Avatar
    0
    tteoh created

    <cite>hikalkan: </cite> Hi,

    1. Check this: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Background-Jobs-And-Workers#disabling-job-execution">http://www.aspnetboilerplate.com/Pages/ ... -execution</a> Disable job execution for web application.

    2. Create a Windows service and just add Abp package since this is only needed package. But if you used Hangfire, you should also add hangfire module. Windows Services are similar to console apps, there is one sample: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-samples/tree/master/PhoneBook/src/Acme.PhoneBook.ConsoleApp">https://github.com/aspnetzero/aspnet-ze ... ConsoleApp</a> Note: You should also add your application's modules like in this sample console app.

    @hikalkan the github link can longer be found. Pls kindly where I could refer to as I am exploring how implement Window Services that enable external interfaces to existing aspnetzero application.

    Thanks. /tommy

  • User Avatar
    0
    alper created
    Support Team

    <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-samples/tree/de92b625fa5a35153b2b947f3e833da88b9bf4be/PhoneBook/src/Acme.PhoneBook.ConsoleApp">https://github.com/aspnetzero/aspnet-ze ... ConsoleApp</a>

    If you cannot find it, here's the project [attachment=0:3sa42mgf]Acme.PhoneBook.ConsoleApp.rar[/attachment:3sa42mgf] Acme.PhoneBook.ConsoleApp.rar