[X-Unix] Cron problem

Marley Graham mgraham at aquaflo.com
Thu Jun 23 15:56:31 PDT 2005


I put in the full path, but I still get the same error; crontab  
doesn't seem to like the parentheses in the $(/bin/date +%r) command.

I decided to try another approach. I created a script to get the date  
format that I really want (hh:mm:ss):

$ cat exacttime
     #!/bin/bash
     date +%r > tempdate
     awk '{print $1}' tempdate
     rm tempdate
     exit

and another script to call screencapture and append the time to the  
name of the resultant file:

$ cat screenpictimed
     #!/bin/bash
     screencapture mg$(/users/marleygraham/exacttime)
     exit

which produces a file like:

     mg04:25:59

I know it is not elegant scripting, but it should get the job done.

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

On Jun 22, 2005, at 3:23 PM, Norman Cohen wrote:

> 2 points. With cron you need the full path to the date function.  
> Type "which date" in the terminal to get the path. Second, I'd  
> suggest formatting the date string to not include the colon  
> character. In applescript, this is the default symbol for  
> separating directories and files in partial or full paths, just as  
> the / character is used in unix.
>
> Norm
> Nacohen at mac.com
> Sent wirelessly via BlackBerry from T-Mobile.
> _______________________________________________
> 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