[X-Unix] Cron problem - Again

Marley Graham mgraham at aquaflo.com
Thu Jun 23 16:19:09 PDT 2005


Duh! It finally broke through my mental crust & I just finished  
setting up root's crontab. Thanks, Eric.

Marley Graham
Aqua-Flo Supply
==============

On Jun 23, 2005, at 3:56 PM, Eric F Crist wrote:

> Marley,
>
> CRON, itself, runs as root but a process in a user's crontab entry  
> will run as that user.  If you must have this work, put these  
> programs in root's crontab file.
>
> HTH
>
> On Jun 23, 2005, at 4:54 PM, Marley Graham wrote:
>
>
>> This is the error that shows up in system.log:
>>
>> Jun 23 14:00:00 <user>s-Computer CRON[2011]: (isadmin) CMD (/ 
>> screenpicsadmin)
>> Jun 23 14:00:01 <user>s-Computer /usr/sbin/screencapture:  
>> kCGErrorRangeCheck : Window Server communications from outside of  
>> session allowed for root and console user only
>>
>> (I substituted <user> for the actual user's name).
>>
>> I thought that CRON ran as root; why would it have a problem in  
>> this instance?
>>
>> Marley Graham
>> Aqua-Flo Supply
>> ==============
>>
>> On Jun 23, 2005, at 2:18 PM, Eric F Crist wrote:
>>
>>
>>
>>> Have you checked your log files?
>>>
>>>
>>>
>>> On Jun 23, 2005, at 1:00 PM, Marley Graham wrote:
>>>
>>>
>>>
>>>
>>>> I have my screencapture program running under cron on my  
>>>> machine. So I figured I would do the same on some client  
>>>> machines for which I have set up an admin account. But it  
>>>> doesn't work on the client machines. Here is what I have:
>>>>
>>>> On my machine:
>>>> $ crontab -l
>>>> 0,30 7-16 * * 1-6 /users/marleygraham/screenpict
>>>>
>>>> Where screenpict is the script:
>>>> #!/bin/bash
>>>> /usr/sbin/screencapture mg$(/users/marleygraham/exacttime)
>>>> exit
>>>>
>>>> And exacttime is the script:
>>>> #!/bin/bash
>>>> /bin/date +%r > tempdate
>>>> awk '{print $1}' tempdate
>>>> rm tempdate
>>>> exit
>>>>
>>>> On the client machine, I have set up an admin user isadmin. I  
>>>> logged onto the client over ssh and set up the cron job using  
>>>> crontab -e. Then I copied the scripts to the  client using ARD  
>>>> copy, changed the owner to isadmin, and edited to change the  
>>>> username. So on the client I have:
>>>>
>>>> n$ crontab -l
>>>> 0,30 7-16 * * 1-6 /screenpicsa
>>>>
>>>> Where screenpicsa is:
>>>> #!/bin/bash
>>>> /usr/sbin/screencapture /isscreen$(/exacttime)
>>>> exit
>>>>
>>>> And exacttime is:
>>>> #!/bin/bash
>>>> /bin/date +%r > tempdate
>>>> awk '{print $1}' tempdate
>>>> rm tempdate
>>>> exit
>>>>
>>>> The files look like:
>>>> -rwxr-xr-x    1 isadmin  isadmin       82 22 Jun 16:40 exacttime
>>>> -rwxr-xr-x    1 isadmin  isadmin       67 23 Jun 08:21 screenpicsa
>>>>
>>>> I am not getting any files generated by cron. Any ideas why?
>>>>
>>>> Marley Graham
>>>> Aqua-Flo Supply
>>>> ==============
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> X-Unix mailing list
>>>> X-Unix at listserver.themacintoshguy.com
>>>> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix
>>>>
>>>> Listmom is trying to clean out his closets! Vintage Mac and  
>>>> random stuff:
>>>>         http://search.ebay.com/_W0QQsassZmacguy1984
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> _______________________________________________________
>>> Eric F Crist                  "I am so smart, S.M.R.T!"
>>> Secure Computing Networks              -Homer J Simpson
>>>
>>> _______________________________________________
>>> X-Unix mailing list
>>> X-Unix at listserver.themacintoshguy.com
>>> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix
>>>
>>> Listmom is trying to clean out his closets! Vintage Mac and  
>>> random stuff:
>>>         http://search.ebay.com/_W0QQsassZmacguy1984
>>>
>>>
>>>
>>
>> _______________________________________________
>> X-Unix mailing list
>> X-Unix at listserver.themacintoshguy.com
>> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix
>>
>> Listmom is trying to clean out his closets! Vintage Mac and random  
>> stuff:
>>         http://search.ebay.com/_W0QQsassZmacguy1984
>>
>>
>>
>
>
> _______________________________________________________
> Eric F Crist                  "I am so smart, S.M.R.T!"
> Secure Computing Networks              -Homer J Simpson
>
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix
>
> Listmom is trying to clean out his closets! Vintage Mac and random  
> stuff:
>         http://search.ebay.com/_W0QQsassZmacguy1984
>



More information about the X-Unix mailing list