my ubuntu machine has pagers for taking screenshots, it is working when I run manually
root@bobby:~# pageres https://example.com 480x320 --format=jpg --filename 'page' --overwrite
But, when I enable cron entry it is not working and throwing MTA error, probably due to the output enabled.
* * * * * su bobby "/usr/bin/pageres https://example.com 480x320 --format=jpg --filename 'page' --overwrite" >> log.log
* * * * * su bobby "pageres https://example.com" >> log.log
both commands are not working.
suorsudoto run a command/script under a different UID, the system crontab file format supports a sixt field requiring a user-name and which allows you to do that directly. - In addition to the duplicate link: a top reason cron jobs fail is that people don't use absolute path names to commands, files and directories – HBruijn Nov 15 '18 at 09:30