LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CronJob Run URL Problem (https://www.linuxquestions.org/questions/linux-newbie-8/cronjob-run-url-problem-907137/)

c a g a t a y 10-08-2011 02:37 PM

CronJob Run URL Problem
 
Hi all

I wanna run below URL with Cron command
But cant find exact command

http://www.example.com/forum/index.php?action=duyuru

Tried;
wget --spider "http://www.siteadi.com/forum/index.php?action=duyuru"

wget -o
wget -q

All of them unsuccessful :(
Does this URL must be end with *.php
Any idea?

Regards

corp769 10-08-2011 06:51 PM

Hello,

What exactly are you trying to do with the URL? View it? Download it? Post/Get data to the page? Knowing more information like this will better assist us to help you.

Cheers,

Josh

c a g a t a y 10-09-2011 02:30 AM

I wanna explain like that;

When I put this URL to my browser's adress line and hit to Enter,
it posts to members a birthday email...

I dont know whether this is view?post?get?

http://www.example.com/forum/index.php?action=duyuru

lithos 10-09-2011 05:24 AM

you should use lynx not wget (Wget is a free software package for retrieving files using HTTP, HTTPS ...)

or maybe PHP cli like "php /path/to_myscript/script.php"
where script.php contains the URL line and the code to open it like this "header('Location: ..."

c a g a t a y 10-09-2011 06:01 AM

my URL does not end with php
i'll try and say the result of lynx command
but i dont know how is the lynx command?

lithos 10-09-2011 06:51 AM

it doesn't matter if URL is not PHP, it's the PHP 'parser' that will open the url which you specify in the
" header( 'Location: http://www.yoursite.com/new_page.html' )" php file (this php file can be used as "script" in this case)

Lynx can be run like: lynx "my_site url"

c a g a t a y 10-09-2011 07:19 AM

I set command line like this:

lynx "http://www.mysite.com/forum/index.php?action=dogumgunu"

an email arrived with below message:

Code:


  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://www.mysite.com/forum/index.php?action=dogumgunu[m              [22;67H
[J[1A[0;7mLooking up www.mysite.com[m[K
[J[1A[0;7mMaking HTTP connection to www.mysite.com[m
[J[1A[0;7mSending HTTP request.[m                      [22;22H
[J[1A[0;7mHTTP request sent; waiting for response.[m
[J
[24;1H
[?1l>


lithos 10-09-2011 09:05 AM

Quote:

Tried;
wget --spider "http://www.siteadi.com/forum/index.php?action=duyuru"
what should the output be (this link only opens the site with webhosting offers)?

Quote:

I wanna explain like that;

When I put this URL to my browser's adress line and hit to Enter,
it posts to members a birthday email...
How ?
if you just put this line into browser how could it send something (email or whatever) unless it is running a script on that server ?
Probably the line
Code:

http://www.siteadi.com/forum/index.php?action=duyuru

should containt some message like
http://www.siteadi.com/forum/index.php?action=duyuru?"hapyy birthday"

Please post your complete code (what you enter in browser) or whatever you use to 'run'/send the message to make it scripted running in cron.

c a g a t a y 10-09-2011 11:58 AM

there is running a script that post an email to the members

lithos 10-09-2011 12:04 PM

ok, but how do you 'run' it ? what is the URL address in your browser ?

if
Code:

http://www.mysite.com/forum/index.php?action=dogumgunu
then you can do nothing about it, because Lynx is a text web browser, no graphic/flash or other fancy stuff...

you should have the right URL 'code' to achieve what you want.

c a g a t a y 10-09-2011 12:08 PM

Dear Lithos
I am not dealing with Linux
My site is a SMF forum (php) and this URL runs seamlessly

What I want to do and what I need a linux command is for CronJob
Scheduled action

Forget what is script and where is the php file...This URL is running and sending mail

I just need an EXACT COMMAND for Cron

Regards


All times are GMT -5. The time now is 03:16 AM.