Why does my bash script work in a terminal, but not when using crontab?

Solution for Why does my bash script work in a terminal, but not when using crontab?
is Given Below:

Why does my bash script work in a terminal, but not when using crontab?

I run Pop OS (Debian/Ubuntu)

My crontab line:

0 * * * * /bin/bash root /home/henry/yupdate.sh > /dev/null 2>&1

Here is my script yupdates.sh:

#!/bin/bash

PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
sudo apt update 
sudo apt upgrade -y  
flatpak update -y

The script runs fine in a terminal.

The crontab is running in my /var/log/syslog

Jul 30 17:00:01 pop-os CRON[17989]: (root) CMD (/bin/bash root
/home/henry/yupdate.sh > /dev/null 2>&1)

What I am doing wrong?

The user name precedes the command to run in the system crontab. Use

0 * * * * root /bin/bash /home/henry/yupdate.sh > /dev/null 2>&1

instead.