Re: CRON
Re: CRON
- Subject: Re: CRON
- From: Courtney Schwartz <email@hidden>
- Date: Wed, 24 Nov 2004 14:31:24 -0500
Personally I don't use CronniX, but I have some stuff running by
regular cron via crontab. Can you post the AppleScript and cron stuff
that you're trying to use? That would help debugging, since we can't
currently see where your error is coming from...
In the meanwhile, I usually check:
1) Your error may be caused by the characters you're trying to pass
back and forth. Keep in mind that some AppleScript characters have
special meanings to command line programs like cron and bash, and may
cause errors if you don't escape them properly. For example, a single
quote has definite meaning to bash, causing it to execute a
single-quote encapsulated string and return the value.
2) cron need permission to run your script. It might require a visudo
to do this. In fact, a lot of cron-related stuff can require superuser
permissions, so this might be a good time to review the security
ramifications of running your script by giving superuser status.
3) If the AppleScript requires a GUI, you need to make sure it has that
when the cron runs. Otherwise you'll end up with error messages
clogging your localhost email (type
mail
at the command line to see if you have a bunch of cron error messages).
4) If your script requires a disk that's not the boot volume, make sure
to mount it first. Likewise goes with inactive network connections and
other resources.
5) Sometimes it's just easier to do command line things in a command
line scripting language rather than AppleScript. You might consider
performing most of your actions with a bash or tcsh shell script,
making AppleScript... that is,
osascript -l AppleScript -e 'tell application "iCal"
activate
end tell
inside your shell script where appropriate.
6) Keep in mind that many BSD programs were written thirty years ago,
so an eleven-year-old file is not necessarily out of date; it can
instead mean that the software has become rather stable and standard
from being around so long, and nothing new has occurred that would
change the man page. Being one of the first Unix programs, cron is in
this category of software.
7) Don't edit cron stuff manually, but use crontab.
8) If you find getting at cron stuff to be difficult or tedious, you
might want to consider running a man2html or man2pdf... Then you can
view stuff normally in Preview or Safari.
Web references to consider:
http://www.ss64.com/osx/
This is a page that I frequently consult when the OS X man pages don't
help.
http://www.kernelthread.com/mac/osx/tools.html
That page also includes some blessedly short descriptions of common
command line tools. Useful when you have some output, but don't know
what tool to pass it to for the next stage of processing.
Courtney Schwartz
On Nov 24, 2004, at 1:45 PM, Robert Poland wrote:
At 21:38 -0700 11/23/04, Robert Poland wrote:
I seem to be fighting a losing battle with CRON.
Is there any CURRENT information that works?
In terminal or a BBEdit worksheet:
man cron
man crontab
The above commands give me a file that is eleven years old. It also
tells me to see also man crontab(5)
which gives error;
-bash: syntax error near unexpected token `('
I think the battle is almost lost.
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________
Courtney Schwartz
Documentation Specialist
Global Technology Associates
3505 Lake Lynda Dr. Suite 109
Orlando, FL 32817 USA
(407) 380-0220 x1427
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Re: CRON (From: Robert Poland <email@hidden>) |