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
...
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?...
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...
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
...
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.
...
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...
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...
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?
...
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 ...
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...
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...
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...
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 ...
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...
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...
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.
...
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...
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?
...
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...
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...