Ham
Ham

Reputation: 814

php timer at server side

I am using php any mysql. I would like to create a timer that operates in the server side, and when time reaches a certain value (e.g. 06:00:00), it can trigger the running of another file (such as, update data of a table).

Actually, what kind of technique I shall use apart from php?

Thankyou...

Upvotes: 0

Views: 814

Answers (5)

Flo
Flo

Reputation: 1671

Obviously if you can use them - cronjobs are the correct solution. But if you just have a little webspace or something where you cant setup cronjobs you need something else. You could of course just do it in php but this istn nice, as you have no guarantee that it runs at specified time, maybe it will much later. The perfect solution to that scenario ist something like a webcron: https://stackoverflow.com/questions/163476/free-alternative-to-webcron

Upvotes: 1

Mob
Mob

Reputation: 11098

You need cron jobs for unix systems and task schedular for Microsoft systems.

It runs files when you set it to.

Upvotes: 2

RobFos
RobFos

Reputation: 961

This sounds like you need to use a cron job here is a decent tutorial for you!

Link

Upvotes: 3

Oldskool
Oldskool

Reputation: 34837

If you want events to occur on specific times on the server, use crontab to achieve this on Linux servers or Scheduled Tasks on Windows servers. You can then schedule the execution of a task at a specific time.

Upvotes: 1

Tom
Tom

Reputation: 1701

You should look into cron jobs.

Upvotes: 6

Related Questions