background-process

how to run background process on the iOS using private APIs to sync email items without jailbreaking the phone

試著忘記壹切 提交于 2019-11-29 20:09:46
问题 I'm working on an enterprise application, which is similar to contacts, calendar. I would like to sync my calendar and contact even when my application is in background. I'm good to use private API's also, as I'm not going to submit to the app store. Note here is, i wanted to make this work without jailbreaking the device. Aalready a similar question posted here I'm creating this new thread since the already posted one has a solution suggested for Jailbreaked device. 回答1: If this is an

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

廉价感情. 提交于 2019-11-29 20:05:38
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 prints: Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. It appears to print this every time if I do a git fetch repeatedly, even when there are no changes and nothing for git fetch to do. This doesn't make a lot of sense to me. It also seems to happen with other network operations, such as git

Message Queues in Ruby on Rails

六眼飞鱼酱① 提交于 2019-11-29 19:37:41
What message queues are people using for their Rails apps and what was the driving force behind the decision to choose it. Does the latest Twitter publicity over their in house queue Starling falling down affect any existing design decisions. I am working on an app that will need a message queue to process some background tasks, I haven't done much of this, and most of the stuff I have seen in the past has been about Starling and Workling, and to be honest the application is not very big and this solution would probably suffice, but I'd love to get experience integrating the best solution

Capturing the PID of a background process started by a Makefile

社会主义新天地 提交于 2019-11-29 19:35:22
问题 I have a Makefile that starts a Django web server. I would like the server to be started in the background, with the PID saved to a file. My recipe looks like this: run: venv @"${PYTHON}" "${APP}/manage.py" runserver 80 Intuitively, to background the process and capture the PID, I'd have to do something like this: run: venv @"${PYTHON}" "${APP}/manage.py" runserver 80 & ; echo "$$!" > "${LOGDIR}/django.pid" This doesn't work, though. The sub-shell that 'make' uses (/bin/sh in my case) works

Have a background process running continously on an MVC4 website

独自空忆成欢 提交于 2019-11-29 16:25:25
问题 I have an ASP.NET MVC4 website running and now i need some sort of background task that is continously running. But is this even possible? The MVC4 website is a sort of notifying system. Other websites can register a Callback URL on this website and this website should trigger that callback URL for a specified interval. So, for every hour for example. Normally the code of my website only becomes active when I visit a page. But in order to make this work I need a way to have my ASP.NET website

Checking battery level in the background with a service

廉价感情. 提交于 2019-11-29 15:47:16
问题 I've searched a lot but I'm always more confused. I have to create an app that works on background and checks the battery level. How can I create the Service? The Service should start on the device boot and must communicate with the Activity when the battery reaches a certain percentage, so there isn't any interaction from the consumer. What type of Service have I to create? What are the things I have to do? 回答1: Rather than using a long-running service, use an AlarmManager to trigger alarms

Get Apple's remote push notifications even after app terminates

走远了吗. 提交于 2019-11-29 15:41:28
I am developing an iOS app which receives apple's remote push notifications at a particular time interval. The notifications are received successfully when app is active as well as when app is in background. But when app is terminated from app switcher/dock, notifications are not received until the app is started again. I have tried following code to keep app alive in background. This same code is implemented in applicationWillTerminate: method, but it did not work. __block UIBackgroundTaskIdentifier bgTask ; UIApplication *app = [UIApplication sharedApplication]; bgTask = [app

UIApplicationBackgroundRefreshStatusDidChangeNotification usage without corresponding delegate method

本小妞迷上赌 提交于 2019-11-29 15:23:16
问题 I feel that UIApplicationBackgroundRefreshStatusDidChangeNotification introduced in iOS 7 is of little use without supporting UIApplication delegate method. Because, the app is not notified when user has switch ON the background refresh state for my app. This is my notification handler... - (void)applicationDidChangeBackgroundRefreshStatus:(NSNotification *)notification { NSLog(@"applicationDidChangeBackgroundRefreshStatus with notification info = %@ and refresh status = %d", notification,

exiting shell script with background processes

南楼画角 提交于 2019-11-29 10:23:37
I need somehow to exit my script.sh (with return code - would be the best) which runs some other commands and other scripts in the background. I've tried to run commands via nohup myInScript.sh & also I've tried to use at the end of script.sh disown -a[r] and also I've tried to kill it kill $$ but the script just hangs after last command and won't quit. How to force it to exit after running its commands? please help. edit: To be more specific, I'm running the script remotely via ssh on the other machine. Sodved From memory a login shell will be kept around even when it finishes if any of its

is it possible to close apps programatically which are running in background in android? [duplicate]

删除回忆录丶 提交于 2019-11-29 09:01:58
This question already has an answer here: How do task killers work? 1 answer I want to stop or close apps which are running in background in android. Is it possible? If so how to achieve this. Refer any links will be appreciated. Thanks in advance.. You can use Process.killProcess(int pid) to kill processes that have the same UID with your App. You can use ActivityManager.killBackgroundProcesses(String packageName),with KILL_BACKGROUND_PROCESSES permission in your manifest(for API >= 8) or ActivityManager.restartPackage (String packageName) (for API < 8) to kill specified process,except of