crontab for osx

E

estrellas

Guest
hi guys -
i'm pretty new to mac systems (usually a windows person with some experience in redhat 9.0/7.2) ..

so i'm trying to install a crontab for my system and i was wondering the syntax and stuff of it .. is it the same as it is in linux or is it different? does stuff have to be in certain directories in order for it to work?

because what i have running right now is this...
Code:
[email protected]
*/60 * * * *  ( $PATH/backup.sh -n $PATH/bkup.txt) > /dev/null;
*/2 * * * 6     ( $PATH/backup.sh -f $PATH/bkup.txt) > /dev/null;

backup.sh is to backup files from some of my stuff. ..and backup.txt tells the system what files. now i know that this script does work on linux because that's where i wrote it .. and i *think* i should be getting emails every minute telling me that the files are backed up and stuff, but nothing is showing up in my little window.

that's my other question in general too ...
does osx have the same commands as linux? or are they different?

i think that's all for now .. thanks for reading this :)
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
You should be able to look at the man listing on the crontab command. It should give you the syntax.
 
Joined
Mar 9, 2004
Messages
2,860
Reaction score
21
Points
38
Location
Miami FL
Your Mac's Specs
G4 1Ghz OS X 10.4.7
In OS X crons can be manually run in the finder > applications > utilities > terminal: type sudo sh /etc/daily and run weekly - monthly as needed
 
Joined
Dec 28, 2003
Messages
911
Reaction score
13
Points
18
Location
Long Island, NY
Your Mac's Specs
15" MacBook Pro & 23" ACD
or you can spend 9$ and just get Macaroni from versiontracker and never have to worry about maintaining your mac ever again!
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
I use CronniX to create crontabs and to edit them etc etc. All the same commands should be available to you.. i guess it depends on the flavor that you were using and what shell you were using and what command you are talking about :)

Remember to set your file to be executable.. otherwise it will not go anywhere :)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top