I forgot you can't just run a shell script with rsync calls via cron on macOS because of... security. I think my workaround will do though.
I write a shell script and then create an Automator application that calls the shell script. I then add a cron job to open the application.
I need to check if it runs when the screen is locked. I'm pretty sure it does but I will test again.
@rasterweb I did not know that. Doesn't seem like it does much to increase security, just a small speed bump for hackers.
@davidlsparks From what I can tell the whole need to give full disk access to applications seems to extend to things like zsh, bash, rsync, etc...