如何在cpanel中配置cron作业 [英] How to configuration cron job in cpanel

查看:82
本文介绍了如何在cpanel中配置cron作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在cPanel中为 .PHP 脚本配置Cron Job。

How to configuration Cron Job in cPanel for .PHP script.

我想每天运行它

我需要在哪里存储此 .php 文件?

Where i need to store this .php file ?

如何检查其是否正常工作?

How can i check whether its working or not ?

推荐答案

您可以放入<$ c $服务器中 public_html文件夹中的c> file.php 文件。
您可以在cpanel高级部分中选择cron job。
在那里,您可以选择添加新的cron作业和名为每天一次的通用设置,这将满足您的需求。
在命令字段中粘贴: wget --spider http://yoursite.com/file.php ,然后保存。

You may put the file.php file in the "public_html" folder in your server. You have the option of cron job in the cpanel "Advanced" section. Once you're there you have the option to add a new cron job and "common setting" called "Once a day", which will satisfy your need. In the "command" field paste this: wget --spider http://yoursite.com/file.php and then save.

当然,这不是最佳做法,但我希望它能为您完成工作。

Of course this is not the best practice, but I hope it will do the job for you.

这篇关于如何在cpanel中配置cron作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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