Can a PHP script be run regularly on a server without requests from a client?

前端 未结 5 1220
旧巷少年郎
旧巷少年郎 2021-01-13 15:02

I\'ll be writing a script to parse text documents into a MySQL database. I\'ll be converting PDF\'s to text with a separate utility. These PDF\'s will be submitted via e-m

5条回答
  •  独厮守ぢ
    2021-01-13 15:43

    Cron Job is the way to go. Also, if I may make a recommendation, make certain to place the PHP script out of a web accessible directory and run it via CLI php.

    If your script is placed in a directory that is accessible from the web, it's possible that it could run more often than desired... especially if a bot/crawler gets hold of it.

提交回复
热议问题