在Plesk 11中设置cron任务 [英] Setting up cron task in Plesk 11
问题描述
服务器>计划任务
我得到一个系统用户的列表如下,但我不知道在哪个用户下执行cron任务,任何想法? - adm
- apache
- bin
- li>
- ftp
- 游戏
- gopher
- 路线到webalizer
如果cron脚本路径与哪个用户相关,则下面的路径如下 -
/var/www/vhosts/mysite.com/httpdocs/scripts/index.php
如果要创建订阅级别的任务,您可以创建cron / windows调度程序任务:
订阅>您的订阅>网站和域>点击显示高级操作>预定任务您的订阅的FTP用户名称。
注意:注意Plesk 11.5和Plesk 12+的界面更改 - 没有必要打开显示高级操作。
最新的Plesk 12.5提供了许多选项来覆盖大多数任务案例:
Plesk 12.5
其他Plesk版本仅支持运行命令选项:
Plesk 12.0
Plesk 11.5
如果您只需要回答,请在服务器 - >计划任务中选择
:-
您的订阅的FTP用户
mysite.com
-
您可以选择
root
,但出于安全考虑,我们不建议您这样做。
对于Plesk版本低于12.5 来计划在Windows上执行PHP脚本有两种方法:
<
以您的脚本作为参数直接调用 php
二进制。
路径到可执行文件: C:\Program Files(x86)\Parallels\Parallels Panel\Additional\PleskPHP55\php.exe
参数:指向您的脚本的路径 C:\inetpub\vhosts\domain.tld\httpdocs\script.php
注意:注意解释路径, ... Additional\PleskPHP55\php.exe
通过请求调用脚本,可以将PleskPHP55更改为PleskPHP5,PleskPHP53或PleskPHP54您的网站:
可执行文件的路径: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
参数: -c(new-object system.net.webclient).downloadstring('http: /domain.test/script.aspx')
I'm trying to setup a cron task in Plesk to run a short script every 5 minutes, I've just moved from a managed hosting account to a full access Plesk VPS, and I'm a little lost on a couple of things, this one in particular, when I go to Server > Scheduled Tasks
I get a list of 'system users' as below, but I'm not sure under which user to make the cron task, any ideas?
- adm
- apache
- bin
- daemon
- ftp
- games
- gopher
- .. going all the way down to webalizer
The cron script path is below if that's relevant as to which user to choose -
/var/www/vhosts/mysite.com/httpdocs/scripts/index.php
If you are going to create subscription-level task, than you can create cron/windows scheduler task in:
"Subscriptions" > your subscription > "Websites & domains" > click on "Show advanced operations" > "Scheduled Tasks" > there will be only one name of FTP user of your subscription.
Note: Pay attention to interface changes for Plesk 11.5 and Plesk 12+ - there is no need to open "Show advanced operations".
The latest Plesk 12.5 provide a lot of options to cover most of the task cases:
Plesk 12.5
Other Plesk versions support only "Run a command" option:
Plesk 12.0
Plesk 11.5
If you need just answer, in "Server" -> "Scheduled Tasks" you can choose:
FTP user of your subscription
mysite.com
your can choose
root
, but it's not recommended for security reasons.
For Plesk version below 12.5 to schedule execution of PHP script on Windows there is two ways:
Direct call of
php
binary with your script as argument.Path to executable file:
C:\Program Files (x86)\Parallels\Parallels Panel\Additional\PleskPHP55\php.exe
Arguments: path to you script like
C:\inetpub\vhosts\domain.tld\httpdocs\script.php
Note: Pay attention to interpretation path,
...Additional\PleskPHP55\php.exe
it path for PHP 5.5, you can change PleskPHP55 to PleskPHP5, PleskPHP53 or PleskPHP54 to use another PHP version.Call script via request to your site:
Path to executable file:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments:
-c "(new-object system.net.webclient).downloadstring('http://domain.test/script.aspx')"
这篇关于在Plesk 11中设置cron任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!