如何每天自动运行 php 脚本? [英] How to run a php script automatically daily?

查看:35
本文介绍了如何每天自动运行 php 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
如何在cron中运行php脚本

我需要每天在预定时间运行一个 php 脚本来更新数据库中的某些字段并自动发送电子邮件.我该怎么做?

I need to run a php script at the scheduled time daily to update some fields in database and to send automated email. How I can do this?

是否可以在 XAMP 服务器中编写一些服务来每天在预定时间运行脚本?我不知道如何更新数据库并在预定时间自动发送电子邮件.任何人都可以分享一些想法或概念吗?

Is it possible to write some service in XAMP server to run the script daily at scheduled time? I have no idea how to update database and send email automatically at the scheduled time. Can any one share some ideas or concepts?

我使用的是在 Linux 服务器上运行的 PHP 和 MySQL.

I am using PHP and MySQL running in Linux Server.

推荐答案

是否可以在 XAMP 服务器中编写一些服务来每天在预定时间运行脚本?

Is it possible to write some service in XAMP server to run the script daily at scheduled time?

创建一个Cron Job.

这篇关于如何每天自动运行 php 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆