Now that you’ve changed the default program for this file, the button for Change All is active. This button will set your Mac to use the selected application to open files of this type.
Using the 'cron' scheduler | 14 comments | Create New Account
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I should note that there is a gui frontend for editing your crontab available. It's called CronniX, see www.koch-schmidt.de/cronnix. Incidentally, the author is called Sven, too.. ;-)
Thanks Sven - it's posted somewhere here as a tip, too. Good program that makes configuring cron much more straightforward!
-rob.
That URL is now spam.
try http://code.google.com/p/cronnix/
If you cp /etc/crontab and use that as your base crontab, make sure you don't keep the user specification. I changed 'root' to my user and spent hours trying to figure out why my crontab wouldn't work. It was trying to run my username as a command!
On user specific crontabs, do not specify a user to run the command as. The crontab located at /etc/crontab is the system-wide crontab. Root is specified in each so those commands are run as root. The user, root, doesn't have a crontab at all!! This gave me a headache for a while, but I'm glad I understand it now. ![]()
Thankyou so much for that. Just my first time at setting up a cron for an rsync and taken me two hours of searching to find out why nothing was happening.. You are a genious!
Cheers
Some other problems you may have:
When I opened up a GUI application using crond: sh /usr/bin/open ~/Application.app It did not seem to work. I changed it to: /usr/bin/open ~/Application.app >& /dev/null And it worked. I suspect not having the redirect-all at the end causes security problems as I not sure what uid's console is attached to the cron process at that time, and may be the cause of an error I received: 'com.apple.launchd[1] (0x10c650.cron[14768]): Could not setup Mach task special port 9: (os/kern) no access' Hope this helps some people out. PS: I used it to create template mails from an automator script I ran each morning to find people I know what has a birthday that same day.
Oh wow, I hope that works! I've been so frustrated with cron and iCal script alarms not working in the middle of the night!
Rob
Well, I can't confirm that it worked yet, but I have a tip to add. Turns out that the version of perl that root was using was different than the one my account was using. It would have been useful to have the STDERR output, so I changed the shell script call in my applescript wrapper to do something like this:I set my cron file to run in a minute and it worked. Now I just have to see if it will work over night. Rob
Rather than copy the system cron file and edit in a text editor you can use the command
crontab -e which brings up your crontab for editing in the 'vi' editor. When you save your changes it will then parse the crontab you have set up and warn you if there are any obvious errors in it. man crontab
edit command line tool can be used to edit the crontab file, following the setup instructions on its man page -- note that you have to write a little 'helper' shell script to invoke edit with the -w option in order to work around a limitation in crontab.
I've used this for years, but it broke suddenly with the TextWrangler 3.5.3 update, with the error 'crontab: temp file must be edited in place'. This is because the new version of TextWrangler brought in some code from BBEdit which observes a new expert preference. To fix it, quit TextWrangler and execute the following in Terminal: I can't speak to the implications of disabling safe saves, however.
crontab file locations under Mac OSX 10.6 are now:
/usr/lib/cron/tabs
Found this old thread and while most of it seems to be helpful to me, there are some things I can't seem to make happen.
I'm completely new to *nix operating systems and just now getting into the guts of the OSX OS, so vim and the Terminal are fairly new to me. That said, I have a need to run a cron process in root and I can't seem to make it happen. I can't seem to get into the /usr/lib/cron/tabs directory, and I can't figure out what I need to do to read the cron.deny file in the /usr/lib/cron directory. Thanks for any help. Any vi tutorials or anything as well as any bash tutorials would be helpful as well.
To install the cron without using shell editor, check this site Install Cron Without Shell Editor
Active4 years ago
I am trying to setup a cron on my mac, but it seems that it never finishes creating a crontab for my user. I open terminal and enter:
Which returns this:
And then it waits there until I close out of the window, I have let it go for as long as 20min. I open another terminal window to check for the creation of my crontab and I get nothing.
Mac Osx Set Default Editor For Crontab Examples
Any ideas on why I cannot create this, or if I can manually create my crontab so I can edit it?
Daniel Beck♦
95.4k1212 gold badges241241 silver badges292292 bronze badges
JageJage
5 Answers
This isn't about the editor, it's about user permissions. First become root:
Then edit the crontab for the proper user:
After saving the file, can verify that it saved properly by running this:
platformsplatforms
I have encounter this problem just now. While trying to solve the problem, I was referred here form Google. Anyway, here is how I solved it.
use
crontab -e
which you have done right.
Whats a good mac for a college student video editor. Press 'i' to insert your cronjob. For example,
Set Default Search Engine
1 * * * * /Users/Wong/Documents/abc.command
~
Remember to press return after the line. If you don't press return it will be like this
1 * * * * /Users/Wong/Documents/abc.command
Press ESC and type in :wq to save and exit the file. It should says 'crontab: installing new crontab'
I realised that if you don't press return after your line, it won't save the whole thing.
Movavi picture editor for mac. Hope it helps.
Richard WongRichard Wong
Closing the terminal window is not going to make the crontab save.
Since it's using vim to create the file, look up how to use VIM and go from there.
launchd is the (Apple) preferred method in 10.5 and 10.6, but you didn't ask about that, just how to get the crontab created.
eric.seric.s
The window it's showing is a vi editor. On traditional unix systems, vi is the default editor; it looks like Mac OS X has kept that tradition.
Set the
EDITOR and VISUAL environment variables to the name (full path, if it's not in $PATH ) of your favorite editor. E.g.
This setting should go into your GillesGilles
~/.profile (assuming that Mac OS X does read that file when you log in; if there is an OSX way of defining environment variables for a whole session, you can define them there).
55k1515 gold badges119119 silver badges167167 bronze badges
It's my solution:first modify your editor.
export EDITOR=vim then modify .vimrcautocmd filetype crontab setlocal nobackup nowritebackup it will work.
Linux Set Default Editor
PegasusPegasus
Mac Osx Set Default Editor For Crontab -eNot the answer you're looking for? Browse other questions tagged macosterminalcron or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |