LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 01:46 AM   #1
amrogers3
Member
 
Registered: Jan 2004
Posts: 45

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, 03:14 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

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

Original Poster
Rep: Reputation: 15
I did a ./Users/user1/backup.sh from command line
 
Old 01-06-2014, 03:47 PM   #4
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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, 03:57 PM   #5
amrogers3
Member
 
Registered: Jan 2004
Posts: 45

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



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 06:25 AM
VSFTPD files/folders uploaded by OSX machines can only be deleted by OSX machines anon091 Linux - Server 11 03-16-2012 02: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 02:35 PM
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 05:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 07:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:58 PM.

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
Open Source Consulting | Domain Registration