zigojacko
Basic Pleskian
- Server operating system version
- CentOS 7.9
- Plesk version and microupdate number
- 18.0.45
We absolutely have to run cron jobs for Magento as the system user that owns all the Magento files and folders and Plesk makes this very difficult.
I've resorted to actually trying to run a crontab as the user by adding and allowing it to run cron jobs (albeit if I log in as this user to SSH (which I also had to manually allow), it states 'crontab: command not recognised').
The cron job looks like the below in the crontab:-
---
---
(domain.tld is replacing the actual domain name)
I gave up trying to set this cron job up in the Plesk interface as no matter what I tried, I couldn't figure it out. It needs to run the command and then write to a log file as per the above (can this be set as an argument)? I could not find any useful documentation on how to do this online in Plesk.
P.S - it's seems a bit stupid that we don't have the ability to create additional SSH users with sudo access in Plesk.
I've resorted to actually trying to run a crontab as the user by adding and allowing it to run cron jobs (albeit if I log in as this user to SSH (which I also had to manually allow), it states 'crontab: command not recognised').
The cron job looks like the below in the crontab:-
---
* * * * * /opt/plesk/php/7.4/bin/php /var/www/vhosts/domain.tld/httpdocs/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/vhosts/domain.tld/httpdocs/var/log/magento.cron.log
---
(domain.tld is replacing the actual domain name)
I gave up trying to set this cron job up in the Plesk interface as no matter what I tried, I couldn't figure it out. It needs to run the command and then write to a log file as per the above (can this be set as an argument)? I could not find any useful documentation on how to do this online in Plesk.
P.S - it's seems a bit stupid that we don't have the ability to create additional SSH users with sudo access in Plesk.