I know launchd is the way to go, but would really need to use cron in this situation.
I'm trying to run the following command through cron:
rclone copy /Users/x123/Downloads/torrents mega:torrents -q && rm -f /Users/x123/Downloads/torrents/*.*
This works ok on terminal, however when I go
crontab -eand add it, it doesn't run.
I also tried adding the command to an .sh script, making executable and running it with cron, also no good.
I'm honestly at loss. I tried
touching a file, and it works. For example:
*/5 * * * * touch ~/Downloads/torrents/Test1.txt
Creates the file just ok, however:
*/5 * * * * rclone copy /Users/x123/Downloads/torrents mega:torrents -q && rm -f /Users/x123/Downloads/torrents/*.*
Doesn't, neither does:
*/5 * * * * cd /Users/x123/ && ./script.sh (which the script contains the command)
Worth noting: cron, crontab have Full Disk access.
Should I take this inquiry to
rclone forum? Any help understanding what's going on would be super appreciated!
So I learned a few things:
When working with
cronand it seems to not work, check your
Always use full paths when dealing with
If you instruct
crona command, and then decide to move all this to a script, check and recheck your script. In my case, I was so wrapped up in full paths, that I forgot about the command verbs!
Thank you all guys for the continuous and great support. It's extremely valuable!