# Need alarm type app



## Solaris17 (Mar 28, 2012)

I need a program that you can add programs too. in my case.

httpd.exe
mysqld.exe

etc
etc

and when the program closes i need an alarm to go off until it starts back up or I tell it to stop. Iv searched and SEARCHED for a program like this but I havent found one yet. I cant believe it doesnt exist. this would be a really useful app.


----------



## FordGT90Concept (Mar 28, 2012)

Shouldn't those be ran as a service?  You can make Windows endlessly restart services.


----------



## Solaris17 (Mar 28, 2012)

FordGT90Concept said:


> Shouldn't those be ran as a service?  You can make Windows endlessly restart services.



they are. but the .exe still shows and depending on what im doing apache stalls when starting backup and i dont notice (aka it isnt running) but do to the fact it is a server id rather not reboot it like every 7 days etc. Its just easier for me to hear an alarm. it doesnt happen often and usually when im doing something to it. but like i said. sometimes apache filezilla etc is stubborn and i dont notice its off. Since the server has no head (VNC only) and I dont check it often id like to know asap if something goes down.


----------



## FordGT90Concept (Mar 28, 2012)

Why do you need an alarm and just set Windows to restart them?  It could even "run a program" which could be your alarm.


----------



## Solaris17 (Mar 28, 2012)

FordGT90Concept said:


> Why do you need an alarm and just set Windows to restart them?  It could even "run a program" which could be your alarm.



because when it stalls i need to manually reboot the PC in order for them to start again.

im assume you dont know of one since your giving me the 4th degree? I mean its not like I tell you how to manage your PCs or ask you why you like fords.


----------



## TheoneandonlyMrK (Mar 28, 2012)

FordGT90Concept said:


> Why do you need an alarm and just set Windows to restart them? It could even "run a program" which could be your alarm.



to be fair to him that would work if the program you set it to run on fail was just an annoying noise(or tune on repeat
), ive not tried it (actually) but it does look do able

im thinking metronome soft but havent found the thing yet
http://download.cnet.com/Weird-Metronome/3000-2133_4-10073673.html maybe

sod, i might use that for a jam at some point but no auto play tut sos


----------



## FordGT90Concept (Mar 28, 2012)

Solaris17 said:


> because when it stalls i need to manually reboot the PC in order for them to start again.


There's a "restart the computer" option too...
-Take no action.
-Restart the service.
-Run a program.
-Restart the computer.

If you want to get real techincal, "run a program" and have it run shutdown.exe with the /r flag to restart.


There's no sense using 3rd party software when Windows has everything you need to handle it entirely autonomously.  There's a reason why services exist and why the program you're searching for doesn't exist. XD


Yes, I could write you one that does what you ask but only if you exhaust the Windows Service feature set first.


----------



## Solaris17 (Mar 28, 2012)

FordGT90Concept said:


> There's a "restart the computer" option too...
> -Take no action.
> -Restart the service.
> -Run a program.
> ...




please explain to me.

1. Were you missed that they were already installed as a service.
2. Were i specifically stated the pc needed to be rebooted.
3. How it never occured to you that i wouldnt want a website to go down so i could get a second rate service like filezilla running again.

having it automatically reboot whenever something going down is ALSO a terrible idea. like i ALSO stated. If i am doing something to it and take a program offline and go to do some reaserch i do not want to be greeted with a forced reboot envoked. that would really just upset me. i would rather wait to reboot/start a service at a time i see fit. I never asked you to make one. I was asking the forums if they knew of one. IDK if your trolling or just somehow think your that important. I know the pc can be rebooted im 10ft from the server at all times. im asking for this [program for a specific reason and if all you can contribute is how much I dont need it then i half half a mind to report you. now if you please.


----------



## Aquinus (Mar 28, 2012)

Apache 2 and MySQL? Would you happen to be using PHP in that mix to make a LAMP stack (but without the L)? When you run into an issue like this, it is much better to resolve the issue, not handle the symptoms of an issue instead (bandaids don't typically work). If that is the case, if I were you, I would run a virtual machine in something like VirtualBox and install Ubuntu Server and run a LAMP stack on that instead to keep you web serving (or development,) away from your Windows box.

If you use ubuntu this will get you started:

```
sudo aptitude update; #Update aptitude repo.
sudo aptitude install apache2 php5 php5-mysql mysql-server; # install php5, mysql, and apache (I might install openssh-server as well.)
sudo shutdown -r now; # Restart for good measure, shouldn't be necessary, but it doesn't hurt.
```

Seriously, those 3 lines (or two if you don't want to restart, it isn't needed) will setup a LAMP stack and will be 100% functional. Where is an "easy button" when you need it. 

By default, Apache will point to /var/www as the web root. Also if you *really* want to check to see if Apache is running or not you could write a simple bash script with some grep action since 
	
	



```
sudo /etc/init.d/apache2 status
```
 will give you the status of apache, and you can do something similar with mysql.

It would look something like this:

```
jdoane@plum:~$ sudo /etc/init.d/apache2 status
Apache2 is running (pid 741).
```
...or this.

```
jdoane@plum:~$ sudo /etc/init.d/apache2 status
Apache2 is NOT running.
```


----------



## W1zzard (Mar 28, 2012)

windows task scheduler


----------



## FordGT90Concept (Mar 28, 2012)

Solaris17 said:


> 1. Were you missed that they were already installed as a service.





Solaris17 said:


> they are.






Solaris17 said:


> 2. Were i specifically stated the pc needed to be rebooted.





Solaris17 said:


> because when it stalls i need to manually reboot the PC in order for them to start again.






Solaris17 said:


> 3. How it never occured to you that i wouldnt want a website to go down so i could get a second rate service like filezilla running again.


You insisted as per #2.  I would recommend restarting the service to restarting the computer.  Windows can do both.




Solaris17 said:


> If i am doing something to it and take a program offline and go to do some reaserch i do not want to be greeted with a forced reboot envoked.


Those options only kick on in the event of _failure_.  If the application terminates peacefully (exit code 0), it is not considered a failure so it does not take the action.


Run: services.msc
Find: The services controlling Apache and MySQL
Open: The details for the services.
Click on: Recovery tab.
Set: The options how you want them on the top half of that page for what to do on failure.
Dance: Dance!


----------



## Aquinus (Mar 29, 2012)

FordGT90Concept said:


> You insisted as per #2.  I would recommend restarting the service to restarting the computer.  Windows can do both.
> 
> 
> 
> ...



The Windows Event Viewer should also have a record of a service failure if it is returning a non-zero exit status.


----------



## Kreij (Mar 29, 2012)

Hey Sol. Sorry for being a little late to the party.

Do you need this to run on a Windows or 'Nix server?
Or do you want a Windows (workstation) app that monitors a Windows or 'Nix server on the network?
Do you want audible alarm(s) or is a visual notification sufficient?
If you pause or stop the alarm, do you want it to automatically restart itself after a set period in case you forget to restart the services?
Do you need an (optional) log file for a historical record of alarm events?
Any other requirements you can think of off the top of your head?

I'll be happy to code something for you if you haven't found something that does exactly what you want. 


EDIT : I got bored of waiting to see if you needed something, and it sounded like a fun project, so it's about halfway done.


----------



## dick123 (Apr 19, 2012)

I think used windows task scheduler.


----------



## Solaris17 (Apr 19, 2012)

I didnt use anything. TPU wasnt the resource for what i needed.


----------

