Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is anacron deprecated for Mac? How come I see no output when I run anacron?

I'm running Mac OSX 10.10, Yosemite, and am trying to set up an anacron job that runs a python script weekly.

My anacron tab is as follows:

# /etc/anacrontab
#period delay   job-identifier  command
7       10      cron.test     /absolute/path/to/my/doc/test.py

Nothing happens when I run sudo anacron -fn, and no timestamp file is created when I run anacron -u. The python script is executable, and I've included #!/usr/bin/env python at the top. How can I fix this and get anacron to run?

P.S. - As an aside, I would prefer not to use launchd. What kind of program accepts its inputs in a pseudo-XML format in 2017??

like image 711
user2009020 Avatar asked Mar 05 '17 23:03

user2009020


1 Answers

It seems that anacron is no longer available for macOS, or never was at all according to this comment: https://apple.stackexchange.com/a/227308/176514

I'm afraid you may need to take a look at launchd. More about that here: How do I set a task to run every so often?

EDIT: After some searching, it seems that this link has the latest version, made for 10.4 Tiger. I'm not sure that will work with Yosemite, but it is worth a shot. https://web.archive.org/web/20100723043612/http://members.cox.net/18james/anacron-tiger.html

like image 179
cdignam Avatar answered Oct 14 '22 12:10

cdignam