What is the minUptime

Forever’s documentation explains each briefly: –minUptime Minimum uptime (millis) for a script to not be considered “spinning” –spinSleepTime Time to wait (millis) between launches of a spinning script. A “spinning” application is one that keeps failing/crashing shortly after a restart. –minUptime sets the minimum amount of time that an application is expected to run. If … Read more

Cross-platform background service in .NET Core (think windows service/unix daemon)?

Windows service by itself is a console application which conforms to the interface rules and protocols of the Windows Service Control Manager. You can achieve the same on both platforms using .net core console application as a host.It will require to do some extra configuration to make it behave more like a real service / … Read more

Start a background process in Python

While jkp’s solution works, the newer way of doing things (and the way the documentation recommends) is to use the subprocess module. For simple commands its equivalent, but it offers more options if you want to do something complicated. Example for your case: import subprocess subprocess.Popen([“rm”,”-r”,”some.file”]) This will run rm -r some.file in the background. … Read more

How to deal with Mac OS X Helper/Main app architecture regarding core data, shared preferences and notifications?

There isn’t one right answer to this problem, but here’s how I’d approach it: Both the daemon and viewer application uses the same core data store to save and retrieve data. Because sharing a Core Data store between processes isn’t supported (as far as I know), I’d have the daemon expose an XPC Service. Instead … Read more

Linux daemonize

From http://www.steve.org.uk/Reference/Unix/faq_2.html#SEC16 Here are the steps to become a daemon: fork() so the parent can exit, this returns control to the command line or shell invoking your program. This step is required so that the new process is guaranteed not to be a process group leader. The next step, setsid(), fails if you’re a process … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)