New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

crontab for osx


Post Reply New Thread Subscribe

 
Thread Tools
estrellas
Guest
 
Posts: n/a

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:
MAILTO=me@email.edu
*/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
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
You should be able to look at the man listing on the crontab command. It should give you the syntax.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
witeshark

 
witeshark's Avatar
 
Member Since: Mar 09, 2004
Location: Miami FL
Posts: 2,860
witeshark will become famous soon enough
Mac Specs: G4 1Ghz OS X 10.4.7

witeshark is offline
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
QUOTE Thanks
ApplejustWorks

 
Member Since: Dec 28, 2003
Location: Long Island, NY
Posts: 911
ApplejustWorks is on a distinguished road
Mac Specs: 15" MacBook Pro & 23" ACD

ApplejustWorks is offline
or you can spend 9$ and just get Macaroni from versiontracker and never have to worry about maintaining your mac ever again!
QUOTE Thanks
Murlyn

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

Murlyn is offline
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
QUOTE Thanks
MoltenLava
Guest
 
Posts: n/a

estellas, your understanding is correct. crontab syntax is universal.
QUOTE Thanks

Post Reply New Thread Subscribe


« Connecting to Windows File Share | Mac OS X Suggestions »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 09:01 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?