I am having two domains and i need to copy some file from one domain to another.
cp http://domain1.com/test.xml http://domain2/crontest/
I tried above but it dint work. Is there any other way?
If the two domains are served from the same server, and you have admin access to the whole server (it is not hosted by a hosting company) you can do the copy by converting the URLs to filesystem paths by prepending the document root "docroot" for each site to the path portion of the URL.
If the docroot for domains 1 and 2 is /var/www/domain1 and /var/www/domain2
If the sites are on separate servers and you have ftp access to at least one and shell access to another, you can just use ftp
You can script this for cron - read the manpage
Instead of using ftp you can also use wget