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
18
votes
3 answers

Run programs in background and redirect their outputs to file in real time

I want to run several python scripts simultaneously in one bash session and to inspect their outputs respectively in real time. To fulfil this task, I wrote a simple bash script which is shown below: #!/bin/bash python 1.py > 1.output & python 2.py…
Douglas Su
  • 3,214
  • 7
  • 29
  • 58
18
votes
2 answers

Running a task in background thread periodically in iOS

I'm a new in iOS. I'm working on the app needs to run a task for getting data from Server in the background thread as i don't want to lock the UI in main thread. This task will take a long time, I tried using the NSTimer but it is still lock the UI.…
NTNT
  • 541
  • 1
  • 7
  • 18
18
votes
3 answers

How to create background process in spring webapp?

I want to run background process in parallel with my spring-mvc web-application. I need a way to start in automatically on context loading. Background process is a class that implements Runnable. Is spring-mvc has some facilities for that?
Vladimir
  • 12,753
  • 19
  • 62
  • 77
18
votes
5 answers

Powershell: Run multiple jobs in parralel and view streaming results from background jobs

Overview Looking to call a Powershell script that takes in an argument, runs each job in the background, and shows me the verbose output. Problem I am running into The script appears to run, but I want to verify this for sure by streaming the…
18
votes
2 answers

php background process using exec function

I have searched a lot to find the exact answer but didn't find any. many people mentioned that we should & at end of command to don't wait for response. for example to run bg.php in background , this was recommended: exec("/usr/bin/php bg.php…
Aliweb
  • 1,891
  • 3
  • 21
  • 44
17
votes
2 answers

Hangfire .NET Core - Get enqueued jobs list

Is there a method in the Hangfire API to get an enqueued job (probably by a Job id or something)? I have done some research on this, but I could not find anything. Please help me.
RisingHerc
  • 694
  • 1
  • 9
  • 26
17
votes
4 answers

How to run a background process and do *not* wait?

My goal is simple: kick off rsync and DO NOT WAIT. Python 2.7.9 on Debian Sample code: rsync_cmd = "/usr/bin/rsync -a -e 'ssh -i /home/myuser/.ssh/id_rsa' {0}@{1}:'{2}' {3}".format(remote_user, remote_server, file1, file1) rsync_cmd2 =…
harperville
  • 6,921
  • 8
  • 28
  • 36
17
votes
4 answers

How to prevent a Hangfire recurring job from restarting after 30 minutes of continuous execution

I am working on an asp.net mvc-5 web application, and I am facing a problem in using Hangfire tool to run long running background jobs. the problem is that if the job execution exceed 30 minutes, then hangfire will automatically initiate another…
John John
  • 1
  • 72
  • 238
  • 501
17
votes
4 answers

How to return to bash prompt after printing output from backgrounded function?

How can I return to my bash prompt automatically after printing output from a function that was put in the background? For example, when I run the following script in a bash shell: fn(){ sleep 10 echo "Done" exit } fn…
ff524
  • 387
  • 4
  • 19
17
votes
3 answers

How to test background jobs (Sidekiq) with Rspec?

A large part of my application relies on background jobs to process user's websites, so I need to write some tests to cover these. First question is how to test code that's in a Sidekiq worker class, for example app/workers/some_worker.rb class…
mind.blank
  • 4,820
  • 3
  • 22
  • 49
16
votes
5 answers

Running a command as a background process/service

I have a Shell command that I'd like to run in the background and I've read that this can be done by suffixing an & to the command which causes it to run as a background process but I need some more functionality and was wondering how to go about…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
16
votes
5 answers

macOS menubar application: main menu not being displayed

I have a statusbar application, which runs in the menu bar. Therefore I set Application is agent (UIElement) to true in the info.plst. That results in no dock icon and no menu bar for my application. However, I also have a preference window that the…
Daniel
  • 1,473
  • 3
  • 33
  • 63
16
votes
3 answers

iOS - BLE Scanning on background freezes randomly

UPDATE 14/08 - 3 - Found the real solution: You can check out the solution in the answers below ! UPDATE 16/06 - 2 - May be the solution : As Sandy Chapman suggested in comments in his answer, i'm able now to retrieve my peripheral at the start of…
Jissay
  • 550
  • 9
  • 28
16
votes
1 answer

zsh prompt - checking if there are any background jobs

I'm customizing my zsh prompt and have found the following to check if there are any background jobs: if [[ $(jobs | wc -l) -gt 0 ]]; then # has background job(s) number_jobs='J:${cyan}%j${no_color}' else # no background job(s) …
15
votes
2 answers

How to determine concurrency (threads) while using shoryuken for background jobs?

In my Ruby on Rails application, I'm using shoryouken for background processing. I've many sqs queues (6-7) in my application. One of the queue has 2000-3000 jobs and it takes around 3 hours for the worker to process these 2-3k jobs with a default…