background-process

iphone sdk: prevent alearts while running process in Background

I'm developing an app where I use performSelectorInBackground to do some sync task in the background. In my code I want to be able to detect whether I'm runing in a background process. This way I can prevent alert messages which might otherwise show up. Thanks for your help! Markus ...

Smart Background Thread Task in Ruby on Rails?

I need to perform a task every 5 seconds, but only when users are using the application. As for now, I use cron that works every minute and activates a task that repeats itself every 5 seconds with sleeps between, for a minute. However, it works also when the application isn't being used. Is there a gem that will do this kind of thing?...

How to delay putting process in background until after it is ready to serve, in shell

I have two processes: a server that should be run in background, but starts serving requests after a delay, and a client that should be started when server is ready. The server prints line containg "Acceptin connections" to its stderr when ready (server stderr is redirected to a file when running it in background). How to delay putting...

Silent mode execution with java.exe

I would like to know if there is a way to execute the "java.exe" as a background process (silent mode execution) Ex: java -cp . MyClass arg1 I want to run the above statement as a background process , without opening command window ...

how to find whether a script run as a nohup finished or not?

I tried running a script using nohup like, nohup script.sh & When I tried ps -ef | grep "script.sh" I couldn't find it there except for the grep which is being run with that string as a parameter. Am I doing it right?. Does this mean that the process has indeed finished execution? Thanks. ...

PHP: Prevent a function from returning value?

Hi everybody, How could I make sure that the startProcess(); function is being called, but without halting the execution for myFunction(). I'll guess that there's a way to call a function and prevent it from returning it's value to thereby accomplishing this? Pseudo-code: function myFunction() { startProcess(); return $someth...

Clarifying... So Background Jobs don't Tie Up Application Resources (in Rails)?

I'm trying to get a better grasp of the inner workings of background jobs and how they improve performance. I understand that the goal is to have the application return a response to the user as fast as it can, so you don't want to, say, parse a huge feed that would take 10 seconds because it would prevent the application from being abl...

PHP Queing background proccesses

What is the best way to queue background processes in PHP... Zend's job queue seems very nice but I am not able to switch to zend server what are the alternatives for doing this? ...

Trigger Backgroundworker Completed event.

Hello, I am trying to display the progress bar(marque) in a separate form (progressForm) while i do some calculation in background. I know the typical way of doing it is to include the calculation in background worker and show progressForm in main thread. This approach how ever will lead to lot of synch issues in my application hence ...

sequentially executing background processes unix

Hi, I have two scripts say 'S1' and 'S2'. I execute these scripts as, nohup S1 & nohup S2 & But I would like them to execute sequentially. ie., S2 should execute only on successful completion of S1. How should I go about doing this?. How can I know when S1 finishes execution?. Any examples would be much appreciated. T...

How to run a background process in PHP and read/write its stdout/stdin?

As an extension to question "php execute a background process": Suppose I wanted to keep a process running during a PHP session, like an interactive bash shell. How can I establish redirection of stdout/stdin such that PHP can read/write to the process? UPDATE: The key is to be able to kick off the process and keep it running in the b...

Rails backgroud job processing

I am using starling as a queue server in my rails application. so each time i want to call worker method, I have to start starling and workling client from console. Is there a way where as soon as the passenger is started my workling and starling both get auto started Or preciously when i will call the worker method then only my worlin...

J2EE Submit a form and leave background process working ??

Hello I need to generate a report with java (exporting data from oracle) that can take several minutes, by the amount of data involved, so when I submit my form the screen freezes until it ends. How can I generate the report in a background process, so that the user can continue browsing? JMS? How can i do this with JMS? (Any example ...

How to ensure background thread ends when application ends?

I have an asp.net application with a background thread. The thread starts when the application starts and it is gracefully stopped when the application ends. I am running the website on a shared host. Unfortunately sometimes the application does not trigger the Application_End event when it ends. I would think that the threads would be k...

iOS 4 VOIP app responding in the background

Hi there, I have an iPhone VOIP app that copes with multi-multi transmit and receive (ie teleconferencing) set up using BSD sockets. I would like it to be able to respond to incoming requests when it is in the background but from what I can understand of the iOS 4 docs I can only do this on an NSStream object (or CFRead/WriteStream) by...

PHP background process

Hi, I've wrote a php irc bot, but i need it to work in the background. With this there'd be no quits or so. What is the best way to do this? Thanks and Regards. ...

Advice on backgrounding a task with variables?

I have a python webapp which accepts some data via POST. The method which is called can take a while to complete (30-60s), so I would like to "background" the method so I can respond to the user with a "processing" message. The data is quite sensitive, so I'd prefer not to use any queue-based solutions. I also want to ensure that the b...

c++ create program runs in the background

i wanna make a program runs in the background and shows an icon in tray bar. I'm using win32. What api should i use? Do you know any good tutorials? ...

How to get PID from PHP function exec() in Windows?

I have always used: $pid = exec("/usr/local/bin/php file.php $args > /dev/null & echo \$!"); But I am using an XP virtual machine to develop a web app and I have no idea how to get the pid in windows. I tried this on a cmd: C:\\wamp\\bin\\php\\php5.2.9-2\\php.exe "file.php args" > NUL & echo $! And it gets the file executed, but t...

Firing a timer in a background app and showing UILocalNotifications

I've written an iPhone app to display available bandwidth for my satellite modem, but I'm interested in allowing the timer to continue to fire in the background (though with much greater time between ticks) and display UILocalNotifications during events such as reaching a 20% remaining limit. I think the answer to this is "You can't", bu...