Re: [CentOS] how to set term environment for cronjobs?
Rudi Ahlers wrote on Wed, 1 Oct 2008 15:37:54 +0200: wget downloaded the whole website which was like 23MB everytime, then you added parameters you shouldn't have added. A simple wget URL downloads only that document and nothing else. Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
On Wed, Oct 1, 2008 at 7:06 AM, Les Mikesell [EMAIL PROTECTED] wrote: Rudi Ahlers wrote: On Wed, Oct 1, 2008 at 12:37 AM, Filipe Brandenburger [EMAIL PROTECTED] wrote: Hi, On Tue, Sep 30, 2008 at 16:30, Rudi Ahlers [EMAIL PROTECTED] wrote: I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website. How are you calling these scripts from cron? lynx? wget? curl? Maybe the problem is with the tool you are using to do that. If you give us more details, we might be able to help you better. HTH, Filipe ___ Hi, yes sorry I should have added that :) I'm using lynx, as follows: 9 0 * * * /usr/bin/lynx http://billing/admin/cron.php */5 * * * * /usr/bin/lynx http://billing/pipe/pop.php Lynx wants to do cursor positioning which is fairly useless in non-interactive mode. You can give it a terminal type on the command line with the -term= option, but it would probably be better to use wget instead for non-interactive work. -- Les Mikesell [EMAIL PROTECTED] ___ wget downloads the whole page every time, which wastes bandwidth HDD space. Apart from using the /dev/null option, is there any other way to use it? And with lynx, do I just issue lynx -term=vt100 http://billing/admin/cron.php ? -- Kind Regards Rudi Ahlers ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
On Wed, Oct 1, 2008 at 1:29 PM, Rudi Ahlers [EMAIL PROTECTED] wrote: wget downloads the whole page every time, which wastes bandwidth HDD space. Apart from using the /dev/null option, is there any other way to use it? wget -O- and then devnull :-) curl --silent is quite nice as well ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
Rudi Ahlers wrote: On Wed, Oct 1, 2008 at 7:06 AM, Les Mikesell [EMAIL PROTECTED] wrote: Rudi Ahlers wrote: On Wed, Oct 1, 2008 at 12:37 AM, Filipe Brandenburger [EMAIL PROTECTED] wrote: Hi, On Tue, Sep 30, 2008 at 16:30, Rudi Ahlers [EMAIL PROTECTED] wrote: I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website. How are you calling these scripts from cron? lynx? wget? curl? Maybe the problem is with the tool you are using to do that. If you give us more details, we might be able to help you better. HTH, Filipe ___ Hi, yes sorry I should have added that :) I'm using lynx, as follows: 9 0 * * * /usr/bin/lynx http://billing/admin/cron.php */5 * * * * /usr/bin/lynx http://billing/pipe/pop.php Lynx wants to do cursor positioning which is fairly useless in non-interactive mode. You can give it a terminal type on the command line with the -term= option, but it would probably be better to use wget instead for non-interactive work. wget downloads the whole page every time, which wastes bandwidth HDD space. Apart from using the /dev/null option, is there any other way to use it? Lynx is going to send the page to stdout, which cron will collect and email to you unless you have redirected to /dev/null also, so I don't see a big difference there. For static pages wget can use -N to only get copies after they change, and the -O option to control where it goes, which could be /dev/null if you really never want to see it. And with lynx, do I just issue lynx -term=vt100 http://billing/admin/cron.php ? Yes, but I'd recommend doing 'man lynx', 'man wget', and 'man curl' so you understand the options and features of each. -- Les Mikesell [EMAIL PROTECTED] ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
On Wed, Oct 1, 2008 at 2:55 PM, Les Mikesell [EMAIL PROTECTED] wrote: Rudi Ahlers wrote: On Wed, Oct 1, 2008 at 7:06 AM, Les Mikesell [EMAIL PROTECTED] wrote: Rudi Ahlers wrote: On Wed, Oct 1, 2008 at 12:37 AM, Filipe Brandenburger [EMAIL PROTECTED] wrote: Hi, On Tue, Sep 30, 2008 at 16:30, Rudi Ahlers [EMAIL PROTECTED] wrote: I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website. How are you calling these scripts from cron? lynx? wget? curl? Maybe the problem is with the tool you are using to do that. If you give us more details, we might be able to help you better. HTH, Filipe ___ Hi, yes sorry I should have added that :) I'm using lynx, as follows: 9 0 * * * /usr/bin/lynx http://billing/admin/cron.php */5 * * * * /usr/bin/lynx http://billing/pipe/pop.php Lynx wants to do cursor positioning which is fairly useless in non-interactive mode. You can give it a terminal type on the command line with the -term= option, but it would probably be better to use wget instead for non-interactive work. wget downloads the whole page every time, which wastes bandwidth HDD space. Apart from using the /dev/null option, is there any other way to use it? Lynx is going to send the page to stdout, which cron will collect and email to you unless you have redirected to /dev/null also, so I don't see a big difference there. For static pages wget can use -N to only get copies after they change, and the -O option to control where it goes, which could be /dev/null if you really never want to see it. And with lynx, do I just issue lynx -term=vt100 http://billing/admin/cron.php ? Yes, but I'd recommend doing 'man lynx', 'man wget', and 'man curl' so you understand the options and features of each. -- Les Mikesell [EMAIL PROTECTED] I got lynx to work with the --dump option, and now the errors are gone, and the cronjob works well. wget downloaded the whole website which was like 23MB everytime, whereas lynx gave me the output, which is more usable for trouble shooting the cronjob. Thanx for all your help -- Kind Regards Rudi Ahlers ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
Rudi Ahlers wrote: I got lynx to work with the --dump option, and now the errors are gone, and the cronjob works well. wget downloaded the whole website which was like 23MB everytime, whereas lynx gave me the output, which is more usable for trouble shooting the cronjob. wget should only download 'the whole website' if you specify a -r (recursive) option, otherwise it would just fetch the one file you specified. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] how to set term environment for cronjobs?
Hi, I'm running a crontjob on CentOS 5.2 server, which then connects to a webpage to run some stuff. It has to run this way, since the webpage is on a Windows server, and the Windows scheduled tasks doesn't work as well. It seems like the cronjob is working fine, except that the email output worries me a bit. This is what I get on email, Your Terminal type is unknown! Enter a terminal type: [vt100] TERMINAL TYPE IS SET TO vt100 (B)0[1;24r[m[?7h[?1h=[H[J[22B[J[H[K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [0;7mGetting http://billing/pipe/pop.php[m [22;53H [J[1A[0;7mLooking up billing[m [22;36H [J[1A[0;7mMaking HTTP connection to billing[m [J[1A[0;7mSending HTTP request.[m [22;22H [J[1A[0;7mHTTP request sent; waiting for response.[m [J [24;1H [?1l So, the question is, how do I set the terminal type for a cronjob? -- Kind Regards Rudi Ahlers ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
On Tue, Sep 30, 2008, Rudi Ahlers wrote: Hi, I'm running a crontjob on CentOS 5.2 server, which then connects to a webpage to run some stuff. It has to run this way, since the webpage is on a Windows server, and the Windows scheduled tasks doesn't work as well. It seems like the cronjob is working fine, except that the email output worries me a bit. This is what I get on email, ... So, the question is, how do I set the terminal type for a cronjob? There are many ways to do this depending on the type of program executed by the cron job (e.g. shell script, perl, python, or compiled program). One way that will always work is to write a wrapper script that execs the real script, something like: #!/bin/sh # set a terminal type that makes your application happy TERM=dumb export TERM # set any other environment variables as necessary exec /path/to/real/script Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 The trade of governing has always been monopolized by the most ignorant and the most rascally individuals of mankind. -- Thomas Paine ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
Rudi Ahlers wrote on Tue, 30 Sep 2008 17:44:02 +0200: It has to run this way, since the webpage is on a Windows server, and the Windows scheduled tasks doesn't work as well. I'd rather look there why it doesn't work for you. Scheduled tasks works just fine on my Windows servers. I'm not getting an email from them, if that is what you want, though. Btw, you can also install cron on Windows! Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
On Tue, Sep 30, 2008 at 6:31 PM, Kai Schaetzl [EMAIL PROTECTED] wrote: Rudi Ahlers wrote on Tue, 30 Sep 2008 17:44:02 +0200: It has to run this way, since the webpage is on a Windows server, and the Windows scheduled tasks doesn't work as well. I'd rather look there why it doesn't work for you. Scheduled tasks works just fine on my Windows servers. I'm not getting an email from them, if that is what you want, though. Btw, you can also install cron on Windows! Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com ___ Hi Kai, Even though it would be ideal for it to run on the Windows server, the scheduled tasks simple doesn't work reliably. The script that needs to be triggered is WHMCS's (http://www.whmcs.com)'s billing support crons. The support cron needs to run every 5 minutes, and the billing one every hour. When I set it up on the Windows server, it will work fine for a week or even 3, and then stops working without any warnings. According to Windows, it is running, but I never actually get the billing to work. Our clients was supposed to be invoiced on the 25th, and they didn't get their invoices, and it's now the 30th already. So, I decided to use something that I know, cron. I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website. -- Kind Regards Rudi Ahlers ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
Hi, On Tue, Sep 30, 2008 at 16:30, Rudi Ahlers [EMAIL PROTECTED] wrote: I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website. How are you calling these scripts from cron? lynx? wget? curl? Maybe the problem is with the tool you are using to do that. If you give us more details, we might be able to help you better. HTH, Filipe ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
Rudi Ahlers wrote on Tue, 30 Sep 2008 22:30:29 +0200: I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website. People usually use wget for triggering such tasks, have you tried that? Does you script run fine when not run from cron? Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
On Wed, Oct 1, 2008 at 12:37 AM, Filipe Brandenburger [EMAIL PROTECTED] wrote: Hi, On Tue, Sep 30, 2008 at 16:30, Rudi Ahlers [EMAIL PROTECTED] wrote: I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website. How are you calling these scripts from cron? lynx? wget? curl? Maybe the problem is with the tool you are using to do that. If you give us more details, we might be able to help you better. HTH, Filipe ___ Hi, yes sorry I should have added that :) I'm using lynx, as follows: 9 0 * * * /usr/bin/lynx http://billing/admin/cron.php */5 * * * * /usr/bin/lynx http://billing/pipe/pop.php -- Kind Regards Rudi Ahlers ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] how to set term environment for cronjobs?
Rudi Ahlers wrote: On Wed, Oct 1, 2008 at 12:37 AM, Filipe Brandenburger [EMAIL PROTECTED] wrote: Hi, On Tue, Sep 30, 2008 at 16:30, Rudi Ahlers [EMAIL PROTECTED] wrote: I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website. How are you calling these scripts from cron? lynx? wget? curl? Maybe the problem is with the tool you are using to do that. If you give us more details, we might be able to help you better. HTH, Filipe ___ Hi, yes sorry I should have added that :) I'm using lynx, as follows: 9 0 * * * /usr/bin/lynx http://billing/admin/cron.php */5 * * * * /usr/bin/lynx http://billing/pipe/pop.php Lynx wants to do cursor positioning which is fairly useless in non-interactive mode. You can give it a terminal type on the command line with the -term= option, but it would probably be better to use wget instead for non-interactive work. -- Les Mikesell [EMAIL PROTECTED] ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos