是否可以更改 plesk 计划任务中的命令长度限制?



我有这个命令行,它已经运行到cpanel托管中:

mysql -hlocalhost -e "use xxx_xx; update xxx_jshopping_manufacturers set manufacturer_publish = 0 where `name_es-ES` NOT IN ('BULL SOUND', 'ROYAL', 'BLACK + DECKER (ELECTROD)', 'SAMSUNG', 'DAEWOO', 'OSTER', 'WAHL', 'REMINGTON', 'BROTHER', 'CORELLE', 'SINGER', 'PANASONIC', 'FRIGIDAIRE', 'LG', 'PHILIPS ELECTRONICA', 'PIONEER', 'SONY', 'MOTOROLA', 'DEWALT', 'APPLE', 'JVC', 'MAXELL', 'WELL', 'STANLEY', 'LASKO', 'WESTINGHOUSE', 'CATA', 'FARBERWARE', 'BLACK & DECKER (HERRAM)', 'PHILIPS', 'BLAUPUNKT', 'RAYOVAC', 'BLU', 'JBL', 'BLACK & DECKER (HERRAM)','MUEBLES', 'ALTEC', 'SMART BALANCE', 'NEWLINK', 'YEZZ', 'HUAWEI', 'FORD', 'WINDMERE','DRIJA','REAL SALOON','INGCO'); select count(product_id)as '--- Product quantity ---' from xxx_jshopping_products; select `name_es-ES` as '--- Brands that are hidden ---' from xxx_jshopping_manufacturers where manufacturer_publish = 0;" | mailx -r sender@domain.com -s 'your site has been updated' destination@domain.com cc@domain.com

此命令在 mysql DB 中运行查询以隐藏一些项目,然后通过电子邮件发送结果,它一直没有问题,直到现在我必须将此站点移动到 Centos/plesk 托管,我对脚本进行了更改以包含用户和密码,它像往常一样通过单击 plesk 计划任务面板上的"立即运行"按钮, 但是,当我单击"确定"按钮保存cron时,它给了我此错误

错误:参数值不正确。 cmd:命令不能超过 980 个字符。

有没有办法摆脱这个限制?

可以在不解决最大长度问题的情况下。

创建这样的脚本文件,它将运行。

mysql -h hostname -otherParametersAsNeeded <<EOF1
use xxx_xx;
update xxx_database set ...
...
EOF1

最新更新