restart

How to get an email when a computer is about to restart?

孤人 提交于 2019-12-06 10:59:42
My work computer usually restarts once a week over night. This is done for security purposes. I don't know in advance when this could happen. Sometimes it may take even a month until the next restart. My problem is that I have scripts running on my computer, so I would like to get a notification whenever my computer is about to restart. (I need to know when it restarts because I must log in back to my computer, otherwise the scripts won't run. Anyway . . . ) I'm trying to set Windows Task Scheduler rule to send me an email whenever my computer is about to restart . However, it looks like the

Multi-server monitor/auto restarter in python

你。 提交于 2019-12-06 06:45:38
问题 I have 2 server programs that must be started with the use of GNU Screen. I'd like to harden these servers against crashes with a Python based program that kicks off each screen session then monitors the server process. If the server process crashes, I need the python code to kill the extraneous screen session and restart the server with screen again. I'm very new to python but I'm using this opportunity to teach myself. I'm aware this can be done in bash scripting. But I want to build on

Restart C# application without actually closing and re-opening?

时间秒杀一切 提交于 2019-12-06 05:27:35
问题 How can i get all of my internal code to work as if I used Application.Restart(), but without actually having the program have to close and reopen? 回答1: Depending on the design of your application it could be as simple as starting a new instance of your main form and closing any existing form instances. Any application state outside of form variables would need to be reset as well. There's not a magic "reset" button for applications like it sounds like you're searching for. One way would be

How do you restart an app/reread app.config file when modified (.NET)?

China☆狼群 提交于 2019-12-06 02:38:19
问题 We all know that modifying a .NET web application's web.config file restarts the app and makes it read the updated configuration. How do you do that with a console or WinForms app? Thanks :) 回答1: Probably need a FileSystemWatcher to monitor the file, and handle the relevant event. The System.Configuration.ConfigManager class might have the relevant methods to reload (method call or some such). I don't have VS in front of me, but I'd say there's definately some hooks there for sure. 回答2: Use

How to prevent Android to restart application after calling camera intent?

家住魔仙堡 提交于 2019-12-05 20:43:03
On low memory device I've got a problem after calling camera intent. When activity result should be received Android restart the whole app. Have anybody faced same problem? Is there any solution? timoschloesser I faced the same issue a while ago: Android system stops application when launching Media Intent Apparently there is no solution, so you have to make sure that you save and restore the application state. Well i think, the problem could be: Image byte array is too big such that it touches the limit and android restarts the application so following is what will i do: Calling the intent

Restart mysql within php browser, permissions issue?

北战南征 提交于 2019-12-05 16:49:38
I would like to create a button on my website that restarts mysql (I realize this is really bad news). I am using ec2 which has really strict user permissions. This is my php code, but it's not restarting the session. <?php if(isset($_POST['mysql'])){ exec("sudo /etc/init.d/mysqld restart"); } ?> <form method="POST" action=""> <input type="submit" value="mysql" name="mysql"> </form> This is my suders file ... Cmnd_Alias RESTART_MYSQL = /etc/init.d/mysqld restart mysql ALL =NOPASSWD: RESTART_MYSQL This doesn't work either... Cmnd_Alias RESTART_MYSQL = /etc/init.d/mysqld restart apache ALL

Starting a windows service on remote machine in different domain

随声附和 提交于 2019-12-05 10:16:09
My PC is in Domain A and a remote server in Domain B, I want to restart a service on server from my PC using c# or any other language or script. Notes: I am connected to the server via VPN that means i can manually RDP the server and can manually restart the service. I am not able to access services on server using connect to other computer under action button from local services window. I have admin rights to the server. I can't(not allowed) add any component to server. I have different set of credentials for Remote machine You should first try the sc command to make sure you're able to start

Silent Windows Installer installer without rebooting automatically

一曲冷凌霜 提交于 2019-12-05 05:26:17
Currently I have an MSI which performs a major upgrade, and it is launched as: msiexec.exe /i installer.msi /qn REBOOT=ReallySuppress My question is regarding that particular property REBOOT=ReallySuppress : does this mean it will not restart the system but will do proper changes (if applied) when user reboot her system manually? Or will it simply ignore those things that require to restart the system? Alexey Ivanov The installer performs all the operations. The value ReallySuppress of REBOOT property, or /norestart option , simply suppress system restart, if it's needed. And msiexec.exe exit

Restarting OSX app programmatically

倾然丶 夕夏残阳落幕 提交于 2019-12-05 02:29:33
问题 I need to restart my app in case I reload something that will require a start from the very beginning. I tried this let path = NSBundle.mainBundle().resourcePath!.stringByDeletingLastPathComponent.stringByDeletingLastPathComponent let task = NSTask() task.launchPath = "open" task.arguments = [path] task.launch() exit(0) but I get an error upon the open launch path not accessible 回答1: Though the problem itself was trivial (forgot the path) I leave question and answer in case someone else needs

Have to Restart Apache When Using Django On Apache with mod_wsgi

怎甘沉沦 提交于 2019-12-05 00:55:44
I'm creating a web app with Django. Since I'm very familiar with Apache I setup my development environment to have Django run through Apache using mod_wsgi. The only annoyance I have with this is that I have to restart Apache everytime I change my code. Is there a way around this? mod_wsgi is great for production but I think the included server is better for development. Anyway you should read this about automatic reloading of source code. I feel like this is really just one of those things most people deal with. It's really not that big of a deal. I made a bash script to make this as easy as