How to run a php script automatically daily?(如何每天自动运行 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 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何每天自动运行 php 脚本?
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- PHP foreach() 与数组中的数组? 2022-01-01