Micah DesJardins wrote:
> I'm having issues getting a cronjob to run under Darwin
> (Ok, it's Mac OS Server 10.2.7 , but still! It's Darwin/BSD/OpenSource on
> the inside!)
>
> I'm having trouble getting a Cron job to run as a specific user (mdesjard).
>
> I've tried adding the job via crontab mycrontab and crontab -e logged in as
> this user.. And finally
> sudo crontab -u mdesjard mycrontab
>
> The crontab entry looks like this:
>
> 10 10 * * * mdesjard dbbackupscript
>
> The only other active lines in the file are environment variables:
>
> SHELL=/bin/sh
> PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
> HOME=/var/log
>
> dbbackupscript is a bash script that basically hfstars the contents of a
> folder, and scps it over to the home directory of the same user on a
> different machine. Because I have DSA keys generated, it doesn't ask for a
> password for the scp.
>
> I've tested it many times and from the command line it works great.
> I dropped it into /usr/bin and
> The permissions on the script are as follows
> -rwxr--r-- 1 mdesjard staff 533 Mar 30 13:26 dbbackupscript
>
>
> /var/cron/tabs shows an mdesjard tab with the appropriate entry (listed
> above)
>
> Is there any place cron would be dumping error messages? I'm mystified as to
> what's happening but as far as I can tell, the job simply isn't going off.
>
> Any suggestions or help would be greatly appreciated.
/var/log/cron under linux. Might be best to also specify the full path to the
script:
10 10 * * * /usr/bin/dbbackupscript
think your user name in the file might be messing it up since the cron file is
already yours and so it may be trying to run mdesjard and not finding it instead
of running dbbackupscript.
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss