Getting started with cronjobs on a Mac

前端 未结 6 2059
失恋的感觉
失恋的感觉 2021-01-01 01:40

I\'m trying to get familiar with cron jobs, and I think I get the basic idea (scheduling, syntax, etc), But, I can\'t seem to get it right on my mac with Terminal - where ex

6条回答
  •  耶瑟儿~
    2021-01-01 02:10

    On the off chance that someone else fighting with cron on Snow Leopard stumbles across this, I will dredge up this old thread.

    Yes, launchd is supposed to replace cron, but in fact it can't do certain things cron can.

    Cron is not integrated well. If it sends a message, it ends up in /var/mail/user_name which of course Apple Mail knows nothing about.

    crontab -e throws up saying 'temp file must be edited in place'. Apparently vim is not vi compatible. You can then do crontab "< /tmp/crontab.whatever" (look in /tmp and see what name is actually used) and it will end up in the right place and, assuming you didn't make a typo, will work.

    Yes, it took a while to sort this all out :(

提交回复
热议问题