Frequently Asked Questions and Usage Tips

Will you release CronniX as Open Source

Yes. Starting with version 1.5 I release CronniX as Open Source. I might not always manage to package the latest version as OpenSource immediately, though. Bear with me.

What do I need to do to start cron?

Cron is a system process that's already running. All you have to do to schedule your jobs is save the changes in a crontab. Cron looks at all the files every minute and starts pending jobs.


How do I know if my crontab works?

It can be a little tricky to set up a crontab because often enough you have some script that works fine on the command line but fails if called by cron due to the different runtime environment. Here comes in handy that cron's output is sent via email to the crontab's owner.

The following applies to OS X 10.1 and earlier. See below for Jaguar instructions.

In order to get local mail you need to set a special mail account in Mail.app. This is from a hint at www.macosxhints.com:

"An easier way"
Authored by: frjo on Tue, May 8 at 11:05AM

You don't need to have sendmail running for delivery of local mail, so this is basically all you need to do to get local (and therefore cron's) mail. While you're at it you can also create a forward of root's mail to your account. You do this by creating a file called ".forward" with your short user name in it in root's home directory "/private/var/root".

The following applies to OSX 10.2 (Jaguar)

It seems like the 'Unix mail account' account type has disappeared from Mail.app's account setup options in Jaguar. Unless you reinstalled, the old 'UNIX:' type entries in ~/Library/Mail/ are still there but they're ignored.

Here's how we can get a look at local mail again:

Test: Caveat:

Reading mail like that works and the change sticks unless you delete mail from your local inbox. When you do that, Mail replaces the link to /var/mail/ with a plain mbox file again. You have to reestablish the link to get your local mail again.

There's this tool cron that could schedule a script to check if 'mbox' is still a link or should be relinked... :-)


How do I know if a task triggers at the intended time?

Either you set up the mail account as described above and generate some output with your script/program or you test it by touching a test file from your script: "touch /tmp/crontest". You can then look at the timestamp of this file to see if your task was triggered.

A quick test if cron is working can be made by dragging and dropping a program like TextEdit on CronniX' main window. Set the time a minute ahead wait for it to pop up.


My crontab is screwed up and CronniX won't read it anymore. What can I do?

Use the following command in the terminal to get a look at your crontab:
crontab -l
(That's a lower case ell there)

If you want to remove your crontab to start from scratch do:
crontab -r

To save your crontab to a file that you can edit with a text editor, run
crontab -l > ~/my_crontab
This will 'pipe' the crontab to the file 'my_crontab' in your home directory.

After you've edited 'my_crontab' (be careful to use 'Plain text' if you're editing it with TextEdit, RTF format will not be cron's friend), you can install it with
crontab ~/my_crontab

This is cron in a nutshell. I hope you don't dispose of CronniX now that you know it.


Home