I have the following cronjob:
@reboot /usr/local/bin/python3.9 /home/pi/push_bullet/push_bullet_socket.py >> /var/log/push_bullet_socket.py.log 2>&1
It's the only thing on my crontab. When I look into /var/log/push_bullet_socket.py.log I see that the file exists, but none of the stdout is being sent to file. The script works fine when it's not running as a cronjob, and other than the output not being logged, it works fine as a cronjob. I can confirm that the print statements are being ran in the python script, but for some reason they're not being output to the log file.
This is what's in cron.log after a reboot:
May 2 10:01:03 raspberrypi cron[351]: (CRON) INFO (pidfile fd = 3)
May 2 10:01:03 raspberrypi cron[351]: (CRON) INFO (Running @reboot jobs)
May 2 10:01:03 raspberrypi CRON[401]: (root) CMD (python /bin/push_bullet_socket.py >> /var/log/push_bullet_socket.py.log 2>&1)
May 2 10:01:03 raspberrypi CRON[402]: (pi) CMD (/usr/local/bin/python3.9 /home/pi/push_bullet/push_bullet_socket.py >> /var/log/push_bullet_socket.py.log 2>&1)