locked
How to host/run a .net exe console application non stop for a given timespan RRS feed

  • Question

  • User947600512 posted

    I have a .net console application that basically gets a bunch of data from api , modifies the data and sends as messages to different Messengers like Telegram channel and it repeats every 5 mins.

    I have done the coding and it is working fine. So , no issue with that.

    Now, I need to keep this console up and running for a given time period say , 6 months at least. As I understand , I can run it from my PC but the application will stop whenever my system goes into shut-down or it will not work if there is internet issues.

    How can I host this on a different server to keep this up and running?

    Friday, May 14, 2021 8:59 PM

All replies

  • User475983607 posted

    How can I host this on a different server to keep this up and running?

    A console application is an exe.  Copy the application to the server.  Start the console application using Windows task scheduler at whatever frequency makes sense. 

    It's not clear what should happen if connectively fails but your code should handle any socket errors.   

    Friday, May 14, 2021 9:54 PM
  • User947600512 posted

    @mgebhard, 

    My concern is not just the connectivity.. I am asking , if I need any 3rd party hosting service like hostgator or GoDaddy to host this console job?? Or I can do it else where?? I need to run it everyday 24/7 and I can not that from my PC..

    Friday, May 14, 2021 10:11 PM
  • User475983607 posted

    My concern is not just the connectivity.. I am asking , if I need any 3rd party hosting service like hostgator or GoDaddy to host this console job?? Or I can do it else where?? I need to run it everyday 24/7 and I can not that from my PC..

    As I understand, your question is how to keep a PC running.    

    • Configure your system to stay up and running in your system settings.
    • Purchase a dedicated host.  Shared hosting will not let you run a console app.  
    • Purchase a cheap PC and configure it to not shutdown.
    Saturday, May 15, 2021 10:24 AM