I run a .sh bash file from a directory httpdocs/pub/ftp-admin/. On the command line from the directory everything works fine. If i make a cron task in plesk all magento 2 commands are not working and ik get this message.
Magento supports PHP 7.1.3 or later.
see script below. what is wrong. I run: CentOS Linux 7.8.2003 with php 7.2.31
#!/usr/bin/env bash
file=*.ZIP
if [ -f $file ]
then
echo $file "exist"
#
cp $file ./backup
#
unzip -P web $file
#
rm -f $file
fi
#
if [ -f *BASIC.XML ]
then
mv *_BASIC.XML BASIC.XML
php -f ../../bin/magento import:job:run 1
fi
#
if [ -f *PRICES.XML ]
then
mv *_PRICES.XML PRICES.XML
php -f ../../bin/magento import:job:run 4
php -f ../../bin/magento import:job:run 2
fi
#
if [ -f *STOCKINFO.XML ]
then
mv *_STOCKINFO.XML STOCKINFO.XML
php -f ../../bin/magento import:job:run 3
fi
#
cp -f *.XML ./backup
#
rm -f *.XML
.ZIP
file in the directory when you run the-f *.ZIP
test (and likewise for the other tests)?