- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以,伙计们,我有以下代码:
<?php
$url = "http://example.com/filetorun.php";
$time = date('g:i A d.m.Y', $res['sometime']);
echo `echo "wget --spider {$url}" | at -M {$time}`;
?>
warning: commands will be executed using /bin/sh
job 59 at Mon Jan 13 17:12:00 2020
最佳答案
没有太多细节可以继续,但我将您的注意力引向 at
的这个要求:
The value of the SHELL environment variable at the time of at invocation will determine which shell is used to execute the at job commands. If SHELL is unset when at is invoked, the user's login shell will be used; otherwise, if SHELL is set when at is invoked, it must contain the path of a shell interpreter executable that will be used to run the commands at the specified time.
getent passwd
或
grep /etc/passwd
来确定。无论如何,我建议将 shell 设置为在命令本身中使用,以防止有人更改调用用户的默认 shell 的问题。
关于PHP(Apache) 不执行 BASH 命令 (At + Wget),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59719218/
如果我从命令行使用 wget 而不指定显式用户代理,我想知道传递的默认用户代理是什么。 我有一些基于用户代理更改输出的代码。 wget http://www.google.com -O test.ht
我想使用 wget 下载网络,但为了使它更像一个真正的用户,我想在请求之间进行小的随机延迟。 我正在通过 cmd 执行 wget。 最佳答案 您可以将以下代码添加到命令行中,这会在服务器请求之间增加
我想从 ftp 服务器下载许多文件(大约 10000 个)。文件名太长。我只想用名称中的日期保存它们。例如:ABCDE201604120000-abcde.nc 我更喜欢20160412.nc可能吗?
我想抓取一个网站来构建它的站点地图。 问题是,该站点使用 htaccess 文件来阻止蜘蛛,因此以下命令仅下载主页(index.html)并停止,尽管它确实包含指向其他页面的链接: wget -mkE
当我去ISC时here要下载 BIND,我的浏览器会自动正确保存下载的文件。例如,如果我点击 9.9.4-P2 的下载按钮,它会弹出一个窗口,如果我点击右侧的“BIND 9.9.4-P2 - tar.
我的 shell 脚本中有一个像这样的 wget 命令: reponse="`wget -O- http:localhost:8080/app/index.html`" 我不明白 -O- 选项。我被解
我正在尝试使用Wget下载页面,但我无法通过登录屏幕。 如何使用登录页面上的发布数据发送用户名/密码,然后以经过身份验证的用户身份下载实际页面? 最佳答案 基于手册页: # Log in to the
我创建了指向框中文件的直接链接: 上一个链接是浏览器网络界面,所以我随后分享了一个直接链接: 但是,如果我使用 wget 下载文件,我会收到垃圾。 如何使用 wget 下载文件? 最佳答案 我可以通过
我尝试了“-N”和“--no-clobber”,但我得到的唯一结果是检索现有 example.exe 的新副本,其编号是使用此语法“example.exe.1”添加的数字'。这不是我想要得到的。我只需
当我执行 wget 时,我希望文件系统中保存的文件具有现在的保存日期。不是服务器的日期。当我这样做时: ll -ltr 我首先下载了文件(列表中的最后一个)。 以及如何将其设为默认值?什么时候是默认值
在我的 CentOS 6.5 中,我想安装 wget: # yum -y install wget 但我收到以下错误: [root@localhost yum.repos.d]# yum -y i
我正在尝试使用 wget 抓取网站。这是我的命令: wget -t 3 -N -k -r -x -N 表示“如果服务器版本低于本地版本,则不下载文件”。但这不起作用。当我重新启动上述抓取操作时,会一遍
我在 cron 作业中使用 wget 每分钟将 .jpg 文件提取到 Web 服务器文件夹中(每次使用相同的文件名,覆盖)。此文件夹是“事件的”,因为 Web 服务器也从那里提供该图像。但是,如果有人
我有以下问题。我需要镜像受密码保护的站点。听起来很简单: wget -m -k -K -E --cookies=on --keep-session-cookies --load-cookies=myC
我可以使用 wget 检查 404 错误而不实际下载资源吗?如果是这样怎么办?谢谢 最佳答案 命令行参数--spider正是用于此目的。在此模式下,wget 不会下载文件,如果找到资源,则返回值为零;
我正在通过 wget 下载一些 .mp3 文件(全部合法): wget -r -nc files.myserver.com 有时我必须停止下载,此时文件已部分下载。例如,10 分钟的 record.m
我正在使用 wget 连接到这样的安全站点: wget -nc -i inputFile 其中 inputeFile 由这样的 URL 组成: https://clientWebsite.com/Th
我目前正在使用一个相当复杂的 wget 命令,但它的本质是 -p 和 -k 标志来下载所有先决条件。如何将主要下载文件重命名为 index.html? 比如我下载一个网页 http://myaweso
这看起来应该很简单,但我无法弄清楚。我要发wget类似于以下的请求, wget http://www.foo.com/bar.cgi?param=\"p\" 但我不希望它对引号(或其他任何东西)进行
我正在编写一个需要从 sourceforge 下载发布文件的脚本。如何获得好的链接? 同样的问题及其答案于 2013 年在此处给出,但不再有效。 https://unix.stackexchange.
我是一名优秀的程序员,十分优秀!