LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-05-2014, 02:46 AM   #1
amrogers3
Member
 
Registered: Jan 2004
Posts: 43

Rep: Reputation: 15
help with crontab on OSX 10.8


Trying to get a script file to run on OSX 10.8 via crontab.

I have tried several versions and no go. The script runs fine manually, however, no good using crontab.

Here is script:

Code:
#!/bin/sh

SHELL=/bin/sh
PATH=/usr/bin:/bin:/usr/sbin:/sbin

# Daily Data Backup
rsync -az -e ssh /Users/user1/Desktop/test root@10.0.1.16:/shares/backup/test
Code:
20 01 * * * /Users/user1/backup.sh
Any help would be appreciated.
 
Old 01-06-2014, 04:14 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,845
Blog Entries: 36

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
How are you running the script manually?
 
Old 01-06-2014, 04:18 PM   #3
amrogers3
Member
 
Registered: Jan 2004
Posts: 43

Original Poster
Rep: Reputation: 15
I did a ./Users/user1/backup.sh from command line
 
Old 01-06-2014, 04:47 PM   #4
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,845
Blog Entries: 36

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by amrogers3 View Post
I did a ./Users/user1/backup.sh from command line
I assume this is relative to the root location /? What user are you running the command as? Which user are you editing the crontab for?
 
Old 01-06-2014, 04:57 PM   #5
amrogers3
Member
 
Registered: Jan 2004
Posts: 43

Original Poster
Rep: Reputation: 15
I believe root for both. I can check when I get home. After I ran using ./ I confirmed that rsync copied over the appropriate files/folders.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem with crontab:: command not executed properly via crontab Ankush Seth Linux - Newbie 11 11-11-2013 07:25 AM
VSFTPD files/folders uploaded by OSX machines can only be deleted by OSX machines rjo98 Linux - Server 11 03-16-2012 03:09 PM
Replacing OSX with Linux? No I do not wish to Triple boot OSX, Linux and Windows. Seph64 Linux - General 10 02-06-2011 03:35 PM
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 06:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 08:15 PM


All times are GMT -5. The time now is 08:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration