qbittorrent-cli icon indicating copy to clipboard operation
qbittorrent-cli copied to clipboard

crontab can't run qbt, why?

Open PHCSJC opened this issue 5 years ago • 1 comments

this is success in shell, I have config user password url by "qbt settings set": qbt torrent list

this is also success in crontab: 03 13 * * * qbt torrent --help >>/tmp/ccc 2>>/tmp/ccc

but, this is failed in crontab, never running, /tmp/ccc is empty 03 13 * * * qbt torrent list >>/tmp/ccc 2>>/tmp/ccc

thanks!

my system is debian 10 x64. qbt --help 1.5.19350.1

QBittorrent version: 4.1.5 API version: 2.2.0 Legacy API version: 23 Legacy API min version: 23

PHCSJC avatar Sep 29 '20 05:09 PHCSJC

I need to investigate why it outputs nothing.

Are you running qbittorent and qbt on the same machine and on the default port? If not, you may need to explicitly specify --url parameter in the command if running from crontab.

fedarovich avatar Oct 04 '20 19:10 fedarovich

As there is no screen available when the command is run by cron, it will fail with the default output format as it tries to get the screen witdh. JSON or CSV output format must be used for non-interactive scenarios, e.g.

qbt torrent list -F json

fedarovich avatar Dec 15 '23 03:12 fedarovich