 |
 |
cron jobs not working, what am I doing wrong?
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
I've been trying to setup a cron job via crontab
the file looks solid, most recently I put this in, but it never executes
Code:
* * * * * osascript -e 'tell applcation "Finder" to display dialog "hello"'
that was just a wild effort to get anything to execute. I'm actually using it to schedule iSync to run every morning at 8, that script was
0 8 * * * osascript -e ~/Library/Scripts/iSync.scpt
but that one doesn't work either. I've been searching everywhere I can think of for an explanation, but I can't find any. What am I doing wrong?
(I'm on 10.4.8)
|
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Make sure there is a new line at the end of your crontab file, this is important.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
Tried that, no dice, any other suggestions?
|
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
Originally Posted by SirCastor
Tried that, no dice, any other suggestions?
With cron, we need to supply FULL paths to everything... files, folders and commands alike:
/usr/bin/osascript
|
|
-HI-
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
okay, I tried that, and this ends up in my user mailbox...
(headers)
16:17: syntax error: Expected end of line but found \342\200\234. (-2741)
|
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
Originally Posted by besson3c
No, the applescripts work when run from the command line using osascript.
It's Cron that's not working...
|
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
Originally Posted by SirCastor
No, the applescripts work when run from the command line using osascript.
It's Cron that's not working...
16:17: syntax error: Expected end of line but found \342\200\234. (-2741)
HAHA... This may be a coincidence, but
when I run what you posted in Terminal,
I get a very similar error. Looks like you
misspelled the word appl ication (typo?):
osascript -e 'tell applcation "Finder" to display dialog "hello"'

|
|
-HI-
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
Originally Posted by Hal Itosis
HAHA... This may be a coincidence, but
when I run what you posted in Terminal,
I get a very similar error. Looks like you
misspelled the word appl ication (typo?):
osascript -e 'tell applcation "Finder" to display dialog "hello"'
Of course it has to be something like this... I feel like such a moron. Everything is working properly now... (though I still don't know what was wrong with the script... nothing changed there. Hmm.)
|
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|