1

I'm having a user control panel (UCP) for my game server.
I offer different memberships (gold/silver/bronze etc) for money.
However, I want to run a PHP script every 24 hours, to run a check over the "users" database and see if 30 days have elapsed. I know how to create the function but I don't know how to make it work automatically. My host is using Windows Server 2008 R2.

CSᵠ
  • 10,049
  • 9
  • 41
  • 64
Ariel Weinberger
  • 2,195
  • 4
  • 23
  • 49

1 Answers1

2

Linux / Unix / OS X

Scheduled jobs are call cron jobs under linux.

Configuring cronjobs usually requires you to use the shell (over SSH). Sometimes a hosting provider might provide to schedule jobs through their control panel.

Here's are great article about how to add a cronjob.

Windows

Under windows, you can use the task schedular to execute a job periodically. Read this howto for that.

Arnold Daniels
  • 16,516
  • 4
  • 53
  • 82
  • This is always my preferred approach. It works well because you can specify down to the minute granularity in running the script. Just make sure you have similar granularity in the membership expiration times. – CaseySoftware Jan 01 '13 at 18:57