[X-Unix] Cron problem - Again

David Ledger dledger at ivdcs.demon.co.uk
Fri Jun 24 01:30:38 PDT 2005


Not a solution to you real problem, but what you have is rather convoluted.

date "+%X"
gives the same as your exacttime script.

David


>From: Marley Graham <mgraham at aquaflo.com>
>Subject: Re: [X-Unix] Cron problem - Again
>To: "A place to discuss Mac OS X from the perspective of the command
>	line."	<x-unix at listserver.themacintoshguy.com>
>Message-ID: <ADF3FD09-459E-4513-92CD-753124E82E6B at aquaflo.com>
>Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>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

-- 
David Ledger - Freelance Unix Sysadmin in the UK.
Chair of HPUX SysAdmin SIG of hpUG technical user group (www.hpug.org.uk)
david.ledger at ivdcs.co.uk
www.ivdcs.co.uk


More information about the X-Unix mailing list