background-process

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

亡梦爱人 提交于 2019-12-17 01:39:53
问题 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 take a while. So, what I would like to do is run that method call in another thread so I can return control to the user with "Your request has been submitted". I am reasonably happy to do this as fire-and-forget, though it would be even nicer if the

Writing files in the background process

风格不统一 提交于 2019-12-14 03:56:34
问题 I am trying to create a script that will process modified/new files in a directory (which is being mirrored from a remote directory by lftp but that's another story). To keep track of the files that are modified I use fswatch . I then convert the files detected by fswatch from xml to json and store them in a separate directory. To make sure that I can stop this conversion once there are no more files to process (when the mirroring job is over) I keep track of a file that will be created by

Poll to TCP server every hour ios

◇◆丶佛笑我妖孽 提交于 2019-12-14 03:49:14
问题 In my current application I am needed to poll to a server via TCP connection every hour. I am aware that one of the best options is to use Push Notifications from server side but I cant do that. So currently I am using a timer which fires every 9 minutes to keep the app running in the background. This works fine.. On the hour I call the Poll to the server. The Tcp connection is opened and the poll data is generated however there is no response from the server. Is this because when in the

AFNetworking 2 and background tasks

我只是一个虾纸丫 提交于 2019-12-14 02:39:51
问题 I have a question about AFNetworking 2 and background downloads/uploads thanks to the new iOS7 NSURLSession background requests Is this automatically handled by my AFHTTPRequestOperationManager ? Does it automatically set my requests'session to background mode? I saw that the AFURLSessionManager Has a setDidFinishEventsForBackgroundURLSessionBlock Method but I wonder if everything is automatic? If my app is killed or suspended, will requests keep on going? How can I get a callback when my app

How make iOS app running on background Every one minute in Swift?

倖福魔咒の 提交于 2019-12-14 00:04:51
问题 I want to make an app that makes HTTP request to a website periodically. The app has to run in the background, but can wake up or show a notification, depending on a response of request. Like a message of WhatsApp, but I don't have a webserver, only the device check values of the http get request. 回答1: It's Possible using Silent Push notifications ,you can this answer. import Firebase import UserNotifications @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var

How to put application to background?

允我心安 提交于 2019-12-13 18:35:06
问题 How to put application (activity?) to background so it can work there? moveTaskToBack(true); doesn't work. I have android:noHistory="true" and this code: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch(keyCode) { case KeyEvent.KEYCODE_BACK: moveTaskToBack(true); return true; } return false; } What is wrong? How to put application to background? upd : or maybe I can use moveTaskToBack(true) only in root (MAIN, LAUNCHER) activity? 回答1: If you want to jump to the home

How to launch my app every day at some particular time?

淺唱寂寞╮ 提交于 2019-12-13 16:16:04
问题 I want to create an app which basicly, should launch itself at some particular time, do some stuff in background and after that kill itself. I need a hint in which direction to move and what to read. I'm sorry for kinda dump question, but I'm a total beginner with android. So any reply would be great. 回答1: You should use AlarmManager also you can refere to this thread Android: How to use AlarmManager 来源: https://stackoverflow.com/questions/11664442/how-to-launch-my-app-every-day-at-some

How to create and use background thread to change object from another thread

有些话、适合烂在心里 提交于 2019-12-13 11:14:05
问题 I have object in main thread. I need to create background thread, which will parse website permanently and change object from main thread each time background thread gets new data. What is the proper way to do that? Another question: how to create background thread which will work permanently? I need smth like static Main void() { Object VariableObject = new Object(); //TODO: CreateBackgroundThread (); //TODO: DoForegroundWork(); } ... CreateBackgroundThread void () { while (true) { Object

How to configure PHP to run the same version on the web server as in a background process

那年仲夏 提交于 2019-12-13 06:56:43
问题 From the command line: php --info //⇒ PHP Version => 5.5.18 From the command line within a background process: exec('php --info>>logs/phpVersion.txt'); //⇒ PHP Version => 5.5.14 I want the background process to run version 5.5.18 (or the same version as the web server). Where is that configured? 回答1: You must reinstall 5.5.18 to replace 5.5.14. It's not a configuration file, there are two instances of PHP. If you specify on OS, I will update this answer with further instruction. (Or just

check when two NSOperationQueue have finished to call endBackgroundTask for stopping background task mode

你离开我真会死。 提交于 2019-12-13 06:27:28
问题 in my app i have some NSOperation that update some core data element from a online database, sometime the update require some minute, and when the screen of iPhone lock, the app enter in the background mode, and this update is stopped, so i have to reopen the app to continue the update, so i have asked this some minute ago on SO, i have received this correct answer: - (void)someMethodToKeepRunningInBackground { UIBackgroundTaskIdentifier taskId = [[UIApplication sharedApplication]