Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start an application at system start without login

We have a new server running and we got some new programs doing import routines. So far so good... But there is one program that is put into autostart folder. So it doesn't run until admin logs in and it stops if we logout.

I'd like to put this one into a seperate session so it may work without any interaction by simply starting it with the task scheduler at startup. Is this the right way to do this? Is it safe if I log in later and log out?

Many thanks!

Edit: The applications shows as a symbol in the task bar if running, it can be configured by this. Anything I must know about this if I change?

Edit: It is not my application, I cannot rewrite it as a service.

like image 653
Daniel Avatar asked Aug 06 '15 14:08

Daniel


2 Answers

You need to run your program as a Windows Service. One way of doing it is using the sc.exe program:

> sc create <new_service_name> binPath= "c:\myapp\myapp.exe"

You can read about it here.

like image 89
Pablo Santa Cruz Avatar answered Nov 12 '22 14:11

Pablo Santa Cruz


I successfully added the application by using task schelduler on startup. Login and logout will not quit the application but no symbol is shown. Please add details to my side questions and I'll mark your answer as the accepted one.

Edit: Ended up using this one. If I have to configure, I stop the application in task manager and start it again by link. After that I quit the application and restart it by task scheduler manual start.

like image 33
Daniel Avatar answered Nov 12 '22 15:11

Daniel