Questions tagged [background-process]

A background process is a computer process that runs "behind the scenes" (i.e. in the background) and without user intervention. Typical tasks for these processes include logging, system monitoring, scheduling, and user notification.

A is a background-process.

3176 questions
521
votes
9 answers

How to get process ID of background process?

I start a background process from my shell script, and I would like to kill this process when my script finishes. How to get the PID of this process from my shell script? As far as I can see variable $! contains the PID of the current script, not…
Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133
503
votes
14 answers

How to run Node.js as a background process and never die?

I connect to the linux server via putty SSH. I tried to run it as a background process like this: $ node server.js & However, after 2.5 hrs the terminal becomes inactive and the process dies. Is there anyway I can keep the process alive even with…
murvinlai
  • 48,919
  • 52
  • 129
  • 177
308
votes
20 answers

How to prevent a background process from being stopped after closing SSH client in Linux

I'm working on a Linux machine through SSH (Putty). I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a…
GetFree
  • 40,278
  • 18
  • 77
  • 104
213
votes
14 answers

How do I get a background location update every n minutes in my iOS application?

I'm looking for a way to get a background location update every n minutes in my iOS application. I'm using iOS 4.3 and the solution should work for non-jailbroken iPhones. I tried / considered following options: CLLocationManager…
wjans
  • 10,009
  • 5
  • 32
  • 43
131
votes
6 answers

Background processes in Node.js

What is a good aproach to handle background processes in a NodeJS application? Scenario: After a user posts something to an app I want to crunch the data, request additional data from external resources, etc. All of this is quite time consuming, so…
Ole Spaarmann
  • 15,845
  • 27
  • 98
  • 160
126
votes
1 answer

Why does git keep telling me it's "Auto packing the repository in background for optimum performance"?

Note: I don't think this is a duplicate of this question, which is talking about a non-background pack which hangs git with a subtly different error message. In one of my git repositories, each time I invoke (for example) git fetch, git…
Andrew Ferrier
  • 16,664
  • 13
  • 47
  • 76
104
votes
5 answers

How to run a background task in a servlet based web application?

I'm using Java and I want to keep a servlet continuously running in my application, but I'm not getting how to do it. My servlet has a method which gives counts of the user from a database on a daily basis as well as the total count of the users…
89
votes
10 answers

Can I use threads to carry out long-running jobs on IIS?

In an ASP.Net application, the user clicks a button on the webpage and this then instantiates an object on the server through the event handler and calls a method on the object. The method goes off to an external system to do stuff and this could…
flytzen
  • 7,348
  • 5
  • 38
  • 54
82
votes
3 answers

Run a shell script and immediately background it, however keep the ability to inspect its output

How can I run a shell script and immediately background it, however keep the ability to inspect its output any time by tailing /tmp/output.txt. It would be nice if I can foreground the process too later. P.S. It would be really cool if you can also…
72
votes
7 answers

Alternative solution to HostingEnvironment.QueueBackgroundWorkItem in .NET Core

We are working with .NET Core Web Api, and looking for a lightweight solution to log requests with variable intensity into database, but don't want client's to wait for the saving process. Unfortunately there's no…
68
votes
12 answers

How do I kill a backgrounded/detached ssh session?

I am using the program synergy together with an ssh tunnel It works, i just have to open an console an type these two commands: ssh -f -N -L localhost:12345:otherHost:12345 otherUser@OtherHost synergyc localhost because im lazy i made an…
Skaarj
  • 827
  • 1
  • 6
  • 7
61
votes
9 answers

How to run a command in the background on Windows?

In linux you can use command & to run command on the background, the same will continue after the shell is offline. I was wondering is there something like that for windows…
Louis
  • 1,014
  • 2
  • 11
  • 20
54
votes
3 answers

Simple approach to launching background task in Django

I have a Django website, and one page has a button (or link) that when clicked will launch a somewhat long running task. Obviously I want to launch this task as a background task and immediately return a result to the user. I want to implement this…
Marc
  • 3,386
  • 8
  • 44
  • 68
52
votes
5 answers

android design considerations: AsyncTask vs Service (IntentService?)

I'm designing an android app which will need to do the following steps: user pushes a button or otherwise indicates to "sync data". sync process will use REST web services to move data to and from the server. the data will be stored locally in a…
tia
  • 1,004
  • 3
  • 16
  • 21
51
votes
3 answers

Keep a Service running even when phone is asleep?

I have a Service in my application which is designed to run every 10 minutes. It basically checks up on our servers to see if everything is running properly and notifies the user of any problems. I created this application for internal use at our…
PaulG
  • 6,920
  • 12
  • 54
  • 98
1
2 3
99 100