Closed JamesHopbourn closed 4 years ago
sh script:
fswatch ~/Desktop/1 | while read file do rsync -trl --delete ~/Desktop/1 ~/Desktop/2 now=$(date +"%T") echo "⚠️ $now ${file} synced" done
It can work well by command: nohup ./sync.sh &. But I want to us crontab to launch sh script automator and add this to crontab file:
@reboot (nohup zsh $HOME/Desktop/sync.sh &)
But it doesn't work.
Are you sure fswatch is in the path expected by your cron job?
sh script:
It can work well by command: nohup ./sync.sh &. But I want to us crontab to launch sh script automator and add this to crontab file:
But it doesn't work.