I just created a script to output htop
automatically every n minutes using this method → https://askubuntu.com/a/726661/253251, I put the script on crontab so it can be executed daily. But the output produced by cron was incomplete.
However, if I execute the command manually, there will be no truncated text.
Is there any settings that I can tweak to achieve full output in cron?
UPDATE
I have already tried Waltinator suggestion, it doesn't work and it stretch the output so long which is not what I want.
How to make output similar to the one executed manually ?
export COLUMNS=500
before yourhtop
command. – waltinator Apr 23 '21 at 02:47export COLUMNS=120
or similar would work. Or any other number you deem appropriate. I can't imagine you want unlimited width. – sancho.s ReinstateMonicaCellio Apr 27 '21 at 11:39