• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cron
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cron


  • Subject: Re: cron
  • From: Andrew Oliver <email@hidden>
  • Date: Wed, 24 Nov 2004 13:40:31 -0800

Different problem entirely.

When run under cron none of the system environment variables are setup.
Consequently the chances are your script has no idea what 'system_profiler'
is.

Try changing the do shell script line to say:

 do shell script "/usr/sbin/system_profiler SPNetworkDataType | awk blah
blah"

Andrew
:)

On 11/24/04 1:18 PM, "Robert Poland" <email@hidden> wrote:

> I'm beginning to wonder if it's possible that cron isn't always
> running. Typing the command ps aux | grep crond
> returns:
> rpoland 23030   0.0  0.0    18644    100 std  R+    2:14PM   0:00.00 grep
> crond
>
> Which I have no idea what it means.
>
> By popular demand I'll try to write the offending script details;
>
> in CronniX (user rpoland)
> 40  6  *  *  *  "/Library/Scripts/Universal Scripts/SetSoundVolume"
> 5  21  *  *  *  "/Library/Scripts/Universal Scripts/SetSoundVolume"
>
> tell application "System Events" to set procs to name of every process
> set sysID to do shell script "system_profiler SPNetworkDataType | awk
> '/Ethernet Address/ { print $3 }'"
>
> set myPath to path to me
> set myPrefs to "AwakeTimes"
> -- Typical data "Wake_Up_Time,6:02 AM,Sleep_Time,8:58 PM"
>
> set oldDelim to ""
> set AppleScript's text item delimiters to ","
> read file ((myPath as string) & myPrefs)
> set myData to result
> set WakeUpTime to text item 2 of myData
> set SleepTime to text item 4 of myData
> set AppleScript's text item delimiters to oldDelim
> snip...
>
> Failure seems to occur in the second line when called automatically
> by cron. If I run manually from CronniX it runs correctly.
>
> Tia,

 _______________________________________________
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>)

  • Prev by Date: re: cron
  • Next by Date: Re: Unicode-to-string bug?
  • Previous by thread: re: cron
  • Next by thread: Re: CRON
  • Index(es):
    • Date
    • Thread