最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - php timer at server side - Stack Overflow

programmeradmin1浏览0评论

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...

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...

Share Improve this question asked Oct 27, 2011 at 9:50 HamHam 8143 gold badges15 silver badges25 bronze badges 1
  • what would be practical use of this timer? – Your Common Sense Commented Oct 27, 2011 at 11:55
Add a ment  | 

5 Answers 5

Reset to default 6

You should look into cron jobs.

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

Link

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

It runs files when you set it to.

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./questions/163476/free-alternative-to-webcron

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.

发布评论

评论列表(0)

  1. 暂无评论