我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

我可以使用wget使用public_html上方的相对路径将本地文件作为cron作业运行吗?

I'm trying to setup a script to run in a cron job, and I want it to run once a day. I'm new to cron jobs, and the ones I have seen so far are only using absolute paths like:

http://example.com/path/to/file.

This is the command I want to do in cpanel:

/usr/bin/wget -O - -q -t 1 /home/account/invest/controllers/cron_controller.php

Would this work? Or is another command better than wget?

The best command is php /home/account/invest/controllers/cron_controller.php.

近期文章

  • 如何打印通过URL参数检测到的特定阵列的所有子项?
  • PHP单独如果其他声明
  • 将文件中的变量导入到数组中
  • php mysql codeigniter字符编码
  • 在PHP中将XML代码保存为字符串
  • 如何在这里避免PHP代码重复
  • PDO Fetch_assoc返回单词“Array”
  • 在php电子邮件中以图片为中心的问题
  • 如何在javascript函数中传递php值[重复]
  • 在PHP中的多维数组中搜索值
  • 无法通过渲染传递视图中的参数。 Yii2
  • 在mysql中一次只能允许1个开放条目
  • 在joomla中安装组件时显示表单
  • 可以将php循环功能转换为双桶系统吗?
  • 致命错误:在非对象上调用成员函数fetch_array()
  • 如何在PHP中添加格式化日期
  • 在MySQL中输出错误
  • 如何将YouTube API V3用于实时订阅者
  • 我的包裹在Lumen框架中的位置
  • FatalErrorException:输入字符串太长

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华