background-process

Hangfire and VB.NET - Gettings things configured in the Application Startup class

北慕城南 提交于 2019-12-01 23:45:11
Earlier this week I ran across Scott Hanselman's post about background processing in ASP.NET ( http://www.hanselman.com/blog/HowToRunBackgroundTasksInASPNET.aspx ). I've written routines in the past that automatically hits a page every so often to run some tasks, but this background processing idea is something I never even considered, and Hangfire ( http://hangfire.io/ ) looks perfect for my background processing needs (mainly sending emails). To get HangFire going (after installing it via NuGet) I need to get it started up in the Application Startup class. The documentation provides C# code

Can I use Apple Push Notification Service to have my app do something without notifying user in iOS 7

♀尐吖头ヾ 提交于 2019-12-01 23:29:13
My Algorithm wishes to work this way- If some desired event occurs at my server then I wish to send a small amount of data to every user my app (foreground or background). But, instead of notifying the user I wish my app to do some computation on data and acknowledge server. Remember user must not be notified. You can use the content-available key in the push notification data and application:didReceiveRemoteNotification:fetchCompletionHandler: . It could be considered a bit of a hack for your use case and if you try to use it too much you will get limited by Apples system. You can do this on

creating background processes in php for long running process

本秂侑毒 提交于 2019-12-01 21:31:39
Ok so forgive me if this is a repeat of another question, but after searching I have not found a clear answer. What I basically want to do is have my php web application fire off some event (like an emailer or report generator) that may take a few minutes to complete and immediately return control to the page. I come from a .NET world where this can easily be accomplished with a thread. So here's the workflow: User clicks 'generate Report' button ajax call made to '../blah/generate-report' and returns immediately process is started and runs until completion while the user can then go about his

Running a background task in iOS at a specific time in the future

泪湿孤枕 提交于 2019-12-01 20:45:55
Is there a way to wire a background task (such as toggling the use of location services) in iOS 7 to run at a specific point of time (e.g. tomorrow morning) without the user opening the app, or without having a constantly running background process? The only option that I am aware of is to have a push notification sent to the device at the desired time, but does anyone know of any purely on-device alternatives for this? any purely on-device - unfortunately till now - 2014 there is no such ways. Background task execution if content avaliable appeared in iOS 7 is rather a good thing but it is

Programmatically check if a process is being run in the background

你说的曾经没有我的故事 提交于 2019-12-01 18:30:08
2 questions: 1) Is there any Linux/Posix API to know if a process has been invoked as a background process? linux> myprogram & Can the code for myprogram detect that it has been invoked to run in the background (via & ) ? 2) Is there any Linux/Posix API to make a process run in the background even if it has been started as a foreground process? I.E. somehow 'detach' from the shell at runtime.. (either detach itself from the shell completely, or run as a background process of the shell). linux> myprogram **** starting myprogram as a background job **** linux> The shell prompt should come right

ContentResolver.requestSync in Sync Adapter is not working in Android

瘦欲@ 提交于 2019-12-01 16:57:16
I am trying to write a sync adapter with 'StubProvider' and 'StubAuthenticator', i followed the offical guidelines, my code is running without any errors but 'onPerformSync()' is NOT getting called, i tried everything but no use. My full project can be downloaded from https://www.dropbox.com/s/48bgj3wweehaieu/MyApplication.zip?dl=0 Here are the classes I am using: Class MainActivity public class MainActivity extends FragmentActivity implements View.OnClickListener { // Constants // The authority for the sync adapter's content provider public static final String AUTHORITY = "com.syncadaptertest

How do I pass session to new socket via fsockopen?

我只是一个虾纸丫 提交于 2019-12-01 15:10:41
I need to pass the session to an asynchronous call via fsockopen in php. Can you help me pass the session to the new socket? SOLUTION: The following code works. start.php <?php session_start(); $_SESSION['var1'] = 'value1'; async_call('/async.php'); echo '<pre>'; print_r($_SESSION); echo $_COOKIE['PHPSESSID'] . "\r\n"; echo '<a href="verify.php">verify.php</a>'; function async_call($filepath) { $host = 'sandbox'; // set to your domain $sock = fsockopen($host, 80); fwrite($sock, "GET $filepath HTTP/1.1\r\n"); fwrite($sock, "Host: $host\r\n"); fwrite($sock, "Cookie: PHPSESSID=" . $_COOKIE[

Does the AppDelegate initialize when Healthkit wakes my app in the background?

跟風遠走 提交于 2019-12-01 14:26:45
I use the code below to have my app detect updates to HealthKit data in the background. Will the init method of my AppDelegate be called when this code is run in the background? What methods in the AppDelegate will be called? If someone can provide documentation about the application lifecycle of background code, that will be much appreciated! [healthStore enableBackgroundDeliveryForType:type frequency:HKUpdateFrequencyHourly withCompletion:^(BOOL success, NSError *error) { if (success) { HKObserverQuery *observerQuery = [[HKObserverQuery alloc] initWithSampleType:type predicate:nil

Does the AppDelegate initialize when Healthkit wakes my app in the background?

纵然是瞬间 提交于 2019-12-01 12:51:40
问题 I use the code below to have my app detect updates to HealthKit data in the background. Will the init method of my AppDelegate be called when this code is run in the background? What methods in the AppDelegate will be called? If someone can provide documentation about the application lifecycle of background code, that will be much appreciated! [healthStore enableBackgroundDeliveryForType:type frequency:HKUpdateFrequencyHourly withCompletion:^(BOOL success, NSError *error) { if (success) {

Problem while Working in background and Nstimer?

末鹿安然 提交于 2019-12-01 11:21:06
Hi i have atask to develop the application with Nstimer and background process. I have already implement background process with timer. And it is excuting good.but i have problem when i minimize application first time at that time it is not running the background process. after minimizing application 3 to 4 times. After that it is working smoothly. i also display the code of background task and timer as follow. - (void)applicationDidEnterBackground:(UIApplication *)application { UIApplication* app = [UIApplication sharedApplication]; NSLog(@"Application enter in background"); [NSTimer