restart

C# process restart loop

Hi, I'm trying to make a console app that would monitor some process and restart it if it exits. So, the console app is always on, it's only job is to restart some other process. I posted my code below.. it basically works but just for one process restart... I would appreciate any help!! Thanks in advance! { System.Diagn...

Django site on Nginx+FastCGI goes (504 gateway timeout)

Sometimes my whole Django based site goes into 504 gateway timeout errors so none page can be displayed. Is it possible to write a shell program and cronjob it run every 5 minutes to detect such errors and restart FastCGI process if needed? I'm currently using command below to restart FastCGI in case it's crashed but it doesn't work fo...

Force application to restart on first activity android

Hi, For an unknown reason, I can't get my application leaving properly so that when I push the home button and the app icon again I resume where I was in the app.... But I would like to force the application to restart at the first activity... I suppose this has something to do with onDestroy() or maybe onPause() but I don't know what t...

Conditional restart on Activity onConfigurationChanged

I want to make an activity that allows orientation changes on some condition, but not otherwise. More exactly I want to prevent restarting the activity when a background thread is busy. I have put the configChanges attribute on the activity manifest, and onConfigurationChanged is called when the orientation changes. However I want to al...

How to force an iphone application to restart automatically from the location it is closed by pressing HOME key

Hi, I want to develop an application in which if a method is in execution and user suddenly press home key. and the application exits. the application automatically restart and the method started to execute again from the point where it is closed.. Please guide me the best way.... Thankx in advance.. ...

Can a standalone ruby script (windows and mac) reload and restart itself?

I have a master-workers architecture where the number of workers is growing on a weekly basis. I can no longer be expected to ssh or remote console into each machine to kill the worker, do a source control sync, and restart. I would like to be able to have the master place a message out on the network that tells each machine to sync an...

Is it possible to run locally JRuby on Google App Engine without restarting server on every change?

Unfortunately, GAE requires restart of the server on each code change. Is it possible to prevent it and have immediate feedback after code save? Or, can I import Google App Engine's API into my ruby code and run it on Sinatra server? Tried this but it fails on "import com.google.appengine.api" (it doesn't know what 'com' is). For Sinat...

How to force restart after uninstall for a Basic MSI Project in InstallShield 2009 Premier

InstallShield 2009 Premier, Basic MSI Project: After uninstall completes, I want to force restart the computer. How? Googling found, i have to set 'REBOOTPROMPT' TO 'S' or 'R' and the "Reboot" property. How to set these properties and with what values? ...

Android - Video Restart or Resume

Hi everyone, I am writing a simple android application with a class that extends activity, that plays a video from a url on the web. There is a button on top that on click takes the user to a web page. What I want to do is when the user is browsing the web page, if he hits the back button, I want him to come back to the main activity ...

Android back button does not restart activity?

My app intiates an activity. On the click of a button, the app opens up the browser with a webpage. When I hit the back button, it comes back to my initial activity screen, but does not resume or restart the activity. When I put all the layout code and activity code in onResume instead of onCreate, the activity gets restarted. My que...

Android: When application was killed, how to set entrypoint for new startup?

I am using a separate class with only static fields, to store current application data. It is partly populated from sharedpreferences on application startup. The rest is data like results of some action, used for further browsing these results (multiple activities that use the results). I can go to the home screen, start other applicati...

javascript - how to restart a function from inside it?

How do I restart a function calling it from inside the same function? ...

Virtual Server VM loses network connectivty after restart

Hi , I have a problem with a VM in Virtual Server 2005 technology losing network. Here is the repro steps Copy the VM from another server with saved state. Create a VM using the same differencing disks and the saved state files but with a different network. Restore the VM, it works fine and the network configuration is available. Re...

How to programatically restart a jar ?

I wonder if an executable jar file can restart itself ? For instance after a user made some choice, the program says "Restart the app ?" and user clicks "Yes" then the jar shuts down and restarts itself. Frank ...

Pausing and restarting an Animation

I'm running a CAKeyframeAnimation in a subclass of UIViewController. I want to pause the animation on pressing a "Pause" button and start back from where it paused on pressing a "Resume" button. I've come across an answer to a similar question on this site, but it doesn't work for me. I would appreciate any help. ...

Reboot windows machines at a certain time of day and automatically login with Python

I know how to reboot machines remotely, so that's the easy part. However, the complexity of the issue is trying to setup the following. I'd like to control machines on a network for after-hours use such that when users logoff and go home, or shutdown their computers, whatever, python or some combination of python + windows could restart ...

How to protect application pools from session serialization exceptions?

We're using an Out-of-Process Session Provider (ScaleOut) for an ASP.NET application and we've noticed that when an object that's not correctly setup for de-serialization inadvertently makes its way into session it will eventually cause the entire process to terminate. Reproducing and handling this scenario is where it gets even more i...

How can one restart/reset SQL connection pool in .Net?

I am having a near critical issue with my app using SqlClient against a MS SQL server. The problem is that the SQL server is clustered in a Failover Cluster. If one of the nodes fails or the other node is made active, it seems like the connectionpool is still connected to the old server. The result is that I get exceptions as that nod...

WiX uninstall - close application before Restart Manager

Hi I have an installer done with WiX. When it's done installing, it starts an application that injects some code in the Explorer process. Currently when I uninstall, the Restart Manager kicks in and offers to shut down my application and Explorer. Instead of that I want to close my application manually (this is done by running it again...

How to know when a computer has restarted and log in via command line or c#?

Hi, I'd like to know how to restart a computer in such a way that once restarted it will log in using given credentials via a command-line command or perhaps using some other method perhaps in C# code. To give context, I'm going to need to run this remotely on Windows XP, Vista, And Windows 7 and I am attempting to form a large list of ...