background-process

Use php to trigger another php script, then ignore

北城余情 提交于 2019-12-09 16:57:52
问题 What I'm trying to work out how to do is this: I've got a php file let's call trigger.php that runs some php code that sets off another php file we'll call backgroundProcess.php to start processing. Although trigger.php needs to ignore what happens to backgroundProcess.php , it just has to start it processing and it will stop while backgroundProcess.php keeps going. edit1 I'm running this on Windows Wampserver 2.1 So this has to be a windows command. edit2 Solved it with the following command

Can the R console support background tasks or interrupts (event-handling)?

自闭症网瘾萝莉.ら 提交于 2019-12-09 16:11:50
问题 While working in an R console, I'd like to set up a background task that monitors a particular connection and when an event occurs, another function (an alert) is executed. Alternatively, I can set things up so that an external function simply sends an alert to R, but this seems to be the same problem: it is necessary to set up a listener. I can do this in a dedicated process of R, but I don't know if this is feasible from within a console. Also, I'm not interested in interrupting R if it is

Running a php script via ajax, but only if it is not already running

徘徊边缘 提交于 2019-12-09 08:46:18
问题 My intention is this. My client.html calls a php script check.php via ajax. I want check.php to check if another script task.php is already being run. If it is, I do nothing. If it is not, I need to run it in the background. I have an idea what I want to do, but am unsure how to do it. Part A. I know how to call check.php via ajax. Part B. In check.php I might need to run task.php. I think I need something like: $PID = shell_exec("php task.php > /dev/null & echo $!"); I think the "> /dev/null

'unitOfWork parameter cannot be null' in Background Worker

 ̄綄美尐妖づ 提交于 2019-12-09 03:54:42
问题 I've started getting these errors. It was working perfectly on my previous server. using System; using Abp.Dependency; using Abp.Domain.Repositories; using Abp.Threading.BackgroundWorkers; using EMS.IPs; using System.Threading.Tasks.Dataflow; using System.Threading.Tasks; using System.Linq; using EMS.Contacts; using System.Collections.Concurrent; using Abp.Domain.Uow; using System.Collections.Generic; using EMS.EmailValidation; using Microsoft.AspNetCore.SignalR; using KellermanSoftware

How to send emails using PHPMailer in the background?

时光怂恿深爱的人放手 提交于 2019-12-08 23:32:00
问题 PHPMailers is doing a fine job in sending emails from a gmail account. But it takes quite a bit of time, and the page won't show the response until the email has been sent. Any ways to send the email in the background so that I can provide a better user experience to the user? Thanks! 回答1: The use of an email queue and php exec() is one of the best ways. It will trigger when needed (avoiding the use of CRONs), it's fast because it is called backgrounded, and immediate. 1. Email queue. Take

Transferring Data from Central to peripheral in Background mode in iOS

喜夏-厌秋 提交于 2019-12-08 20:00:31
I am developing an application for a custom wearable communicating through BLE. I have subscribed to the UI background modes in the info.plist file for Bluetooth-central. I am transferring a firmware file of around 600 kb by dividing into chunk sizes of 200 bytes each. The process is going fine but as I am pressing the Home button the app is entering into background state and thus terminating the process after 1-2 minutes. If my screens dims after certain amount of time then the firmware transfer continues but as soon as the home button is pressed the app stops transferring the data after few

Running a process in the background with input/output redirection

早过忘川 提交于 2019-12-08 19:47:33
问题 I'm curious to know if it makes a difference where the '&' operator is used in code when a process has input/output redirection to run a process in the background What are the differences/are there any differences between these lines of code in terms of running the process in the background. If there are, how can I determine what the differences are going to be? setsid python script.py < /dev/zero &> log.txt & setsid python script.py < /dev/zero & > log.txt & setsid python script.py < /dev

Rails background image upload

假装没事ソ 提交于 2019-12-08 10:50:48
问题 I'm using "carrierwave" gem for uploading image files and also "carrierwave backgrounder" to process the uploading + processing the image with RMagick in the background (I use Delayed Job for this). Everything works like a charm. Except one thing - I want to upload the images and show them right under the upload form (so ,everything happens on the same page). So, basically, what happens - since the uploading and image-processing are relatively slow, by the time the page has been rendered

trigger a script when mailbox recieves mail?

空扰寡人 提交于 2019-12-08 10:04:33
I want to process a particular mailbox when it receives mail, I know I could have cron check every n minutes for any mail, but wondering if there's a way to "listen" for mail rather than continually polling. Try a .forward file You can pipe the message into any program or script you want, but also check if procmail can do what you want. Depending on your mail server, it may be possible to actually have any incoming message be delivered to a process. Either in a .forward or by setting up something more advanced. In exim you can setup a transport to run a command, for certain addresses. Jason

IOS Newsstand background troubleshouting

断了今生、忘了曾经 提交于 2019-12-08 09:39:51
问题 I'm starting a newsstand application and first I'm testing all the framework to see who everything works. I already downloaded an issue triggered by a notification when in foreground. but I don't know how to download in background, or at least I'm missing something... Here is the stuff I added to plist: The app is targeted for IOS 5... here is my code... of course I also implemented the three URLConection methods of NKAssetDownload - (BOOL)application:(UIApplication *)application