Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Possible Duplicate:
OSX: Is there a built-in scheduler program?

I'm a "born again OSX user", coming from 20 years of Windows ;-)

I'd like to run a batch file that does maintenance for me - backup, some other stuff every night at a given time. On windows you have something called "Scheduled Tasks" what allows you to handle that. Couldn't find something equivalent on OSX. Is it not implemented on the GUI Level and you have to go to command line for that? something like "cron jobs" on linux?

share|improve this question

marked as duplicate by Loïc Wolff, Kyle Cronin May 27 '11 at 16:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
You can't run batch files on OS X. –  Mark Szymanski May 27 '11 at 14:42
    
but you can run bash files. –  XQYZ May 27 '11 at 14:49
4  
You have a complete list in this question. –  Loïc Wolff May 27 '11 at 14:50
1  
A batch file isn't necessary a .bat, it means a set of stand-alone commands. –  Loïc Wolff May 27 '11 at 14:51
1  
i meant, "batch" as script, whatever the bash shell can handle. It's really a scheduling question... –  ron M. May 27 '11 at 14:53
add comment

2 Answers 2

up vote 0 down vote accepted

OSX is built on a foundation of BSD-style Unix. You can find cron in /usr/sbin/cron, and if you're seeking to just schedule the execution of a command-line utility with command-line parameters, then cron is probably the easiest and most efficient way to get it done.

If you're seeking to get a service run once at boot-time, or to have a maintenance daemon or bot running all the time, then you can use launchd (and launchctl) to do that. If you want a maintenance application to get run when you first log-in, then you can do that with the list of "Login items" in your entry in the Accounts preference pane.

You can also seek to build a workflow using the Automator application (found in your /Applications folder), and then use an iCal alarm to go off on a particular schedule to trigger that workflow.

share|improve this answer
add comment

They are called cron jobs in Unix-like systems. From the terminal man cron and man crontab.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.