Questions tagged [service]

A Service is a long-running executable that performs specific functions and which is designed not to require user intervention.

A Service is a long-running executable that performs specific functions and which is designed not to require user intervention.

Services usually provide an interface to Start, Stop, Pause and Restart the executable that is running in the computer's background.

23127 questions
158
votes
12 answers

How to run a script in the background even after I logout SSH?

I have Python script bgservice.py and I want it to run all the time, because it is part of the web service I build. How can I make it run continuously even after I logout SSH?
zihaoyu
  • 5,483
  • 11
  • 42
  • 46
147
votes
8 answers

Install Windows Service created in Visual Studio

When I create a new Windows Service in Visual Studio 2010, I get the message stating to use InstallUtil and net start to run the service. I have tried the following steps: Create new project File -> New -> Project -> Windows Service Project Name:…
jkh
  • 3,618
  • 8
  • 38
  • 66
144
votes
11 answers

Android - implementing startForeground for a service?

So I'm not sure where/how to implement this method to make my service run in the foreground. Currently I start my service by the following in another activity: Intent i = new Intent(context, myService.class); context.startService(i); And then in…
JDS
  • 16,388
  • 47
  • 161
  • 224
141
votes
11 answers

What is the correct way to start a mongod service on linux / OS X?

I've installed mongodb and have been able to run it, work with it, do simple DB read / write type stuff. Now I'm trying to set up my Mac to run mongod as a service. I get "Command not found" in response to: init mongod start In response to: ~:…
Alex C
  • 16,624
  • 18
  • 66
  • 98
140
votes
14 answers

What replaces WCF in .Net Core?

I am used to creating a .Net Framework console application and exposing a Add(int x, int y) function via a WCF service from scratch with Class Library (.Net Framework). I then use the console application to proxy call this function within the…
Sigex
  • 2,834
  • 2
  • 24
  • 25
138
votes
16 answers

Run a Java Application as a Service on Linux

I have written a Java server application that runs on a standard virtual hosted Linux solution. The application runs all the time listening for socket connections and creating new handlers for them. It is a server side implementation to a…
dreza
  • 3,605
  • 7
  • 44
  • 55
134
votes
36 answers

the MySQL service on local computer started and then stopped

the MySQL service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs. Can anyone resolve this issue? Thanks.
Kem Bardly
  • 1,585
  • 4
  • 12
  • 13
128
votes
6 answers

What's the equivalent of Angular Service in VueJS?

I want to put all my functions that talk to the server and fetch data into a single reusable file in VueJS. Plugins don't seem to be the best alternative. Template less components..?
Faizuddin Mohammed
  • 4,118
  • 5
  • 27
  • 51
126
votes
5 answers

Start service in Android

I want to call a service when a certain activity starts. So, here's the Service class: public class UpdaterServiceManager extends Service { private final int UPDATE_INTERVAL = 60 * 1000; private Timer timer = new Timer(); private static…
Miguel Ribeiro
  • 8,057
  • 20
  • 51
  • 74
120
votes
9 answers

Android: keep Service running when app is killed

I want to keep a IntentService running in background even when the app is killed. And by "killed" I mean press home-button for a long time -> see all running apps -> swipe my app aside -> app killed OR press back-button for a long time -> app…
user2078872
  • 1,507
  • 3
  • 12
  • 16
119
votes
4 answers

.aspx vs .ashx MAIN difference

What are the differences between .aspx and .ashx pages? I use ashx now when I need to handle a request that was called from code and returned with a response, but I would like a more technical answer please.
Arrabi
  • 3,718
  • 4
  • 26
  • 38
118
votes
7 answers

How can I configure a systemd service to restart periodically?

I have a simple systemd service that needs to be periodically restarted to keep its process from bugging out. Is there a configuration option for systemd services to periodically restart them? All of the Restart* options seem to pertain to…
wes
  • 7,795
  • 6
  • 31
  • 41
116
votes
9 answers

Android Starting Service at Boot Time , How to restart service class after device Reboot?

I need to start a service at boot time. I searched a lot. They are talking about Broadcastreceiver. As I am new to android development, I didn't get a clear picture about services on Android. Please provide some source code.
harish
  • 1,755
  • 6
  • 22
  • 36
112
votes
2 answers

Start systemd service after specific service?

I have a general question. How does one start a systemd unit *.service after a particular *.service has started successfully? More specific question is, how do I start website.service only after mongodb.service has started? In other words…
user2312578
112
votes
5 answers

Sending a notification from a service in Android

I have a service running, and would like to send a notification. Too bad, the notification object requires a Context, like an Activity, and not a Service. Do you know any way to by pass that ? I tried to create an Activity for each notification but…
Bite code
  • 578,959
  • 113
  • 301
  • 329