开发者

Possible for server to run scripts

So I realize this question is broad, as I'm looking for a place to start.

Is it possible to have a server that for example runs PHP scripts every day, or every 2 minutes?

Pretty much, I don't want to put these tasks in the users script, because I'm scared they would get run a lot more than is necessary, and I'd prefer to keep it separate.

I'm looking to keep it javascript, PHP o开发者_JAVA百科r SQL as I don't have the time to learn a new language atm, so if any of you have any good places for me to read up on this, I would greatly appreciate it.


There might be some way to run javascript on the server side, but I'd certainly stick to PHP. SQL is not a script, by the way...

You can execute your PHP scripts every x minutes / hours / days using cronjobs. Just google crontab. You need (root) access to the server though.


Javascript will not run server side as you are expecting. what I would suggest is you look into writing a cron job to run a bash file. It would take minimal research to complete.

Cron Intro

Bash Intro


Yes, it's completely possible. On Linux (Mac too?), you use the cron job scheduler to run your scripts.

For Windows, you can try the Windows Task Scheduler. It provides similar functionality.

You can run just about any script with cron, but not JavaScript (unless you use it for serverside stuff).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜