Alternative to Crontab
Bill Campbell
linux-sxs at celestial.com
Mon Nov 26 09:35:24 PST 2007
On Mon, Nov 26, 2007, Bruce Marshall wrote:
>On Sunday 25 November 2007, Kurt Wall wrote:
>> Another alternative is to arrange to get the data file pushed to you
>> instead of you pulling it. That avoids your Web hosting provider's
>> monitoring entirely. All your Web host sees is an incoming file transfer,
>> but there will be no matching cron job in the logs, so, theoretically,
>> they shouldn't care.
>>
>> On a more general level, you're dealing with engineers and techie gear
>> heads here. We solve a problems by obtaining as much information about
>> the problem as possible and then proposing a solution. Actually, everyone
>> will contribute their suggestions until a solution emerges. Right now,
>> we're just trying to understand the problem.
>
>And NOW we learn that she really was trying to push the file. That the file
>resides on a web hosting facility and that is how the ISP(web host'r) can
>monitor whether cron is being run.
>
>So pushing the file is what she is trying to do but I think most web hosts
>don't allow the use of ssh.
>
>I also suspect that trying to do this in real-time or even close to it is
>going to be a very big up-hill battle and perhaps there is some other method
>to accomplish her task. However, we'll never know that because all of these
>thought processes are irrelevant to the problem at hand. (not)
I've handled this type of thing using xmlrpc and the standard
python xmlrpclib. I set up a CGI xmlrpc server answering on the
https port on the target machine to be updated. This server
``validates'' connections by only allowing them from a limited
set of IP addresses to make things as simple as possible.
The handling on the web server side can be something as simple as
this:
#!/usr/bin/env python
from xmlrpclib import ServerProxy
url = 'https://example.com/cgi/myserver.py'
server = ServerProxy(url)
response = server.myfunction(arg1, arg2, ...)
# do more stuff
The server side is a bit more complicated, but not much.
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
There is no distinctly native American criminal class save Congress
-- Mark Twain
More information about the Linux-users
mailing list