I can't execute a script in crontab

Paul Schmehl pschmehl_lists at tx.rr.com
Tue May 18 19:48:24 UTC 2010


--On Tuesday, May 18, 2010 21:52:43 +0300 Yavuz Maşlak 
<yavuz.maslak at netiletisim.net> wrote:

> I use freebsd7.2
>
> I wish to send a file using crontab as periodic. I have a script to send the
> file.
> When I am root, I can execute my script, but I can't execute the script using
> crontab.
> How can I run it ?
>
> cat myscript
> /usr/bin/scp -i /root/.ssh/id_rsa.pub /root/cpfile
> root at 192.168.10.9:/var/cpfile
>

Either make the script executable or cron it like this:

*   *  *  *  *  /bin/sh /path/to/myscript

-- 
Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
*******************************************
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson



More information about the freebsd-questions mailing list