Jump to content

automatic updates - need help


sooty2006

Recommended Posts

ok i have an online game on the net for people of all ages to play what i want to achive is every 30 minutes i want the server to do what i write on a php folder etc... say i wanted 500 points to be added to my account every half hour how would i b able to do that with out being on the site clicking on a run script every half hour plz plz it would help me very much to recieve any infomation thanks scott milner :)

Link to comment
Share on other sites

You need to set up a job to do that. If it is a Linux server, there is a utility called cron that you can use to schedule events to happen. Windows has the Windows Task Scheduler. If you have webspace on a commercial host, ask them if they provide something like cron. You can do a Google search to look up the syntax for cron. If your host does not offer anything like that, then you can just set up a Scheduled Task on your own computer to launch a browser and load the page you want to run. That would require that the computer with the scheduled task remain online.

Link to comment
Share on other sites

ok myserver doesnt wrk with cron so i need to do a sceduled task untill i get it installed or watever i need doing!but i now want to know how to get the scedual to open every 30 minutes at the moment the closest choice i get to that is daily thanks scott :)

Link to comment
Share on other sites

If you are storing this data in a database, you may be able to schedule events in the DBMS. In SQL Server, you can use an Agent to schedule events (i.e. run queries, stored procedures, send an email, etc). I looked on the MySQL site and it looks like there is something similar there too: http://dev.mysql.com/doc/refman/5.1/en/events-overview.htmlDepending on your application, it may make more sense to perform the operations in the database rather than the filesystem.

Link to comment
Share on other sites

In Windows Scheduled Tasks you can set the task to repeat every half hour. You have to right-click on the Task, select Properties, the Schedule tab, Advanced button, and you can set the task to repeat. If you set the task to start at 12:00am, and set it to repeat every half hour for 24 hours, it will run every half hour of every day.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...