Welcome to WebmasterWorld Guest from 34.201.121.213

Forum Moderators: ocean10000

Message Too Old, No Replies

Autorun tasks on IIS

     
9:07 pm on Oct 5, 2007 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2007
posts: 3
votes: 0


Hi all!

Im not new to programming, but quite new to web programming. Anyway
Im creating an online MUD game, (like for example Utopia), and I want
to allow things to happen even though players are not online, for example monsters should move around, so when player logs in again
after x minutes, the monster is not at the same place... I think you get the idea.

If the server were on my computer I wouldnt have any problems. I would just have a program running all the time, updateing the "movements-database". I could also solve the problem, using Web Services (from my computer, same idea), but this would force me to be online all the time.

Is there anyway to do this on tha IIS (6 i think) server that belongs to my web host? Most of all I just want a loop running all the time, sleeping and waking up ever minute or so and modify the DB)

Thanks for reading this far ;) and thanks even more for ANY help/hints in this matter

BR, Robert

9:22 pm on Oct 5, 2007 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2007
posts: 3
votes: 0


btw, running ASP .NET and DB is MS SQL Server 2005
/Robert
9:58 pm on Oct 5, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member ogletree is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 14, 2003
posts:4319
votes: 42


If you had your own server you could run a schedule to do something. Ask your provider if they offer that or some sort of cron job. Otherwise you could put some code on your front page to run every time the page is loaded. Make sure that the code can only run every so often. Maybe have it write one line to a file every time it runs and have it read from that file every time it runs. Have it only run when it is a certain number of minutes or hours after the last time. You would not append the write because you are only concerned about the last run. Your site will get hit often by bots so it will be ran.
11:51 pm on Oct 5, 2007 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2006
posts: 12
votes: 0


to followup on the suggestions by ogletree, you can subscribe to a site monitoring service to hit your site which can launch a job. some monitoring services are free and you can ping every 15 minutes.
5:56 am on Oct 6, 2007 (gmt 0)

Junior Member from US 

10+ Year Member

joined:Jan 30, 2004
posts:127
votes: 0


to followup on the suggestions by ogletree, you can subscribe to a site monitoring service to hit your site which can launch a job. some monitoring services are free and you can ping every 15 minutes.

And to followup on this suggestion... no need to sign up for a monitoring service to do this, you can just do it from you own computer.

andy

8:39 pm on Oct 7, 2007 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2007
posts: 3
votes: 0


Hi again!
thanks for your help. I would have liked to avoid having my own computer online all the time, so I will probably test first, add update code on my page, maybe with some help from my computer now and then, and maybe later on sign upp for one of these ping services
if its insufficient... In the end Ill probably run it from home..
ill probably ask around som more under these topics.

Thanks for your help guys!

/BR Robert