I did something a little different for one of my applications.
I wrote an .exe file in C# using Visual Studio 2010, and then configured Windows Tasks to run it whenever I like. :)
I created my windows service using Visual Studio 2010, generated the exe file, and tried to add it to the services list (services.msc), but the service was not added:
Bader
Member
10 Points
84 Posts
Automatic execution
Apr 03, 2012 03:03 PM|LINK
Hi,
How can I execute a code in background at a specific times (For example, every 12 hours)?
Regards,
Bader
madan535
Contributor
3217 Points
1179 Posts
Re: Automatic execution
Apr 03, 2012 03:09 PM|LINK
We need to create an batch file exe that can be set in windows services to run for every 12 hours
Creating a Basic Windows Service in C#
http://www.codeproject.com/Articles/14353/Creating-a-Basic-Windows-Service-in-C
P_IT
Participant
882 Points
222 Posts
Re: Automatic execution
Apr 03, 2012 03:35 PM|LINK
Hi,
for executing a code in background at a specific time you have to write windows service.
P_IT
paritoshmmec
Participant
1555 Points
304 Posts
Re: Automatic execution
Apr 03, 2012 04:49 PM|LINK
1. Window service is the only option left here
but if you want to use some simple service , you can use windows in built scheduling component.
Thanks and Regards,
Paritosh
GrassProgram...
Member
360 Points
246 Posts
Re: Automatic execution
Apr 03, 2012 04:59 PM|LINK
I did something a little different for one of my applications.
I wrote an .exe file in C# using Visual Studio 2010, and then configured Windows Tasks to run it whenever I like. :)
Bader
Member
10 Points
84 Posts
Re: Automatic execution
Apr 04, 2012 02:40 PM|LINK
Hi,
The above solution doesn't help me,
I'm womder if I can do in IIS a scheduled tasks (Like: http://blog.arvixe.com/how-to-use-schedule-task-to-execute-a-url-like-www-example-comabc-html/).
Please, I need your help.
Regards,
Bader
ramiramilu
All-Star
95503 Points
14106 Posts
Re: Automatic execution
Apr 04, 2012 03:48 PM|LINK
To my knowledge you dont have scheduled tasks in IIS...write a powershell script which can run periodically and can communicate wit IIS...
Thanks,
JumpStart
Bader
Member
10 Points
84 Posts
Re: Automatic execution
Apr 04, 2012 05:32 PM|LINK
Thanks all
Bader
Member
10 Points
84 Posts
Re: Automatic execution
Apr 08, 2012 01:17 PM|LINK
Hi,
I created my windows service using Visual Studio 2010, generated the exe file, and tried to add it to the services list (services.msc), but the service was not added:
C:\Windows\Microsoft.NET\Framework\v4.0.30319>InstallUtil.exe C:\Users\Raya\Desktop\Task_05042012\HelpFiles\WindowsServices\TaskWS\TaskWS\bin\Debug\TaskWS.exe
I opened services.msc , refreshed the list, but the service was not there.
Can you please explain to me how can I solve this issue?
Regards,
Bader
paritoshmmec
Participant
1555 Points
304 Posts
Re: Automatic execution
Apr 08, 2012 01:19 PM|LINK
restart the system , and make sure it is visible to every user.
Thanks and Regards,
Paritosh