Click here to Skip to main content
16,008,010 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Everyone,

I have a VPS in which i put code but its need some times restart system because some functionally not work properly . So i have to restart system for this and also some .exe file. Please tell me can i do these things using window services and how????????


Thanks in Advance.
Posted
Comments
Rahul Rajat Singh 13-Mar-12 2:56am    
bad idea, why not you try to fix the problem. but a far as your question is concerned I am posting a simple solution too, but wont recommend it. as it looks like a dirty HACK to me.
Neetesh Agarwal 13-Mar-12 4:31am    
In my project there is no problem. The pro works fine but some times it create problem so when i restart VPs THEN IT WORKS FINE.......

Don't do evil. If you have functionality problems, fix them. Everything else means fooling everyone, but first of all yourself.

—SA
 
Share this answer
 
Comments
Neetesh Agarwal 13-Mar-12 3:15am    
In my project there is no problem. The pro works fine but some times it create problem so when i restart VPs THEN IT WORKS FINE.......
Sergey Alexandrovich Kryukov 13-Mar-12 12:49pm    
Well, your second statement tells me your project does have problems...
--SA
1. Have a windows service project.
2. have a timer polling for current system time (perhaps every 15 minutes or so)
3. specify a time perios like (12Am to 12:15Am).
4. If the timer finds itself firing within the time zone, kill the exe and/or reboot the system.
 
Share this answer
 
Comments
Neetesh Agarwal 13-Mar-12 3:15am    
In my project there is no problem. The pro works fine but some times it create problem so when i restart VPs THEN IT WORKS FINE.......

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900