find/delete older iCloud files with launchctl
I'm regularly storing archives on iCloud, while also deleting older archives with the command
find ~/Library/Mobile\ Documents/com~apple~CloudDocs -name "*.tar.bz2" -mtime +6 -delete
This command works fine when entered manually, but it does nothing when part of a script executed by launchctl. Other commands in that script, like preparing and moving the current archive to iCloud, work fine, though. The launchd plist lists myself as User.
I'm stumped, any help would be appreciated.
Mac mini (M4)