Date: Tue, 18 May 2010 14:19:16 -0500 From: Paul Schmehl <pschmehl_lists@tx.rr.com> To: =?UTF-8?Q?Yavuz_Ma=C5=9Flak?= <yavuz.maslak@netiletisim.net>, freebsd-questions@freebsd.org Subject: Re: I can't execute a script in crontab Message-ID: <B3B6096D9E0C1F7BAE4385C3@utd65257.utdallas.edu> In-Reply-To: <321BFC21315248CCA4341AA862E19DED@desktop2002> References: <321BFC21315248CCA4341AA862E19DED@desktop2002>
next in thread | previous in thread | raw e-mail | index | archive | help
--On Tuesday, May 18, 2010 21:52:43 +0300 Yavuz Ma=C5=9Flak=20 <yavuz.maslak@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@192.168.10.9:/var/cpfile > Either make the script executable or cron it like this: * * * * * /bin/sh /path/to/myscript --=20 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B3B6096D9E0C1F7BAE4385C3>