Results 1 to 10 of 10
Hi all
I wanna try to run a auto e-mail member for birthday,
I have a mode manuelly installed and it is running seamlessly
When I put below URL to ...
- 10-13-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 5
CronJob Run/Call URL Problem
Hi all
I wanna try to run a auto e-mail member for birthday,
I have a mode manuelly installed and it is running seamlessly
When I put below URL to the browser and hit to ENTER it runs and send e-mail to the members (controlled)
mysite.com/forum/index.php?action=birthday
this URL running;
What I want to do is that;
I wanna run a CronJob daily at 08:00 which launchs this URL
There is no problem with scheduling
But I tear my hair what is the correct command?
wget -q mysite.com/index.php?action=birthday
Any idea?
Cant write exact URL: You are only allowed to post URLs to other sites after you have made 15 posts or more.
Any idea?
- 10-13-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Does that wget command not work, i.e., does it not send the email? I made a simple php script that accepts arguments and did a wget of it and it worked just fine.
Post wget output, if anything there is helpful. Is there anything in the apache log (usually /var/log/httpd/error_log) or the cron log (usually /var/log/cron)?
- 10-13-2011 #3Just Joined!
- Join Date
- Oct 2011
- Posts
- 5
If i put this line to the command field
wget -q /home/mysite/public_html/forum/index.php action=dogumgunu
CronTab says: AJAX Error
Please refresh the page and try again.
- 10-13-2011 #4Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Aren't you running a local webserver? Otherwise, there's no point in using wget. If you start a webserver (assuming you have one installed and configured w/PHP), then try:
Does that give you the same response?Code:wget -q http://www.YourDomain.com/forum/index.php action=dogumgunu
However, if there are AJAX errors...then does the page need to be dynamic/require user interaction for the email to be sent?
- 10-13-2011 #5Just Joined!
- Join Date
- Oct 2011
- Posts
- 5
I am using my webserver (Not local)
Same Ajax Eror returns for your last command (The command that you wrote your last message)
PS: I hate this message: You are only allowed to post URLs (http, ftp, @) to other sites after you have made 15 posts or more.
WHYYYYYY?
- 10-13-2011 #6Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Just use hxxp instead of http.
Can you answer my other question: does the webpage require user interaction in order to send the email? If not, what is AJAX doing in the page that is required?
If the page must be loaded in a browser to work, you could run an X virtual frame buffer, and run firefox using --display= to point to the frame buffer display and pass the URL to it.
- 10-13-2011 #7Just Joined!
- Join Date
- Oct 2011
- Posts
- 5
First of all I am using SMF forum, (simplemachines.org)
a php file (with scripts) sending birhtday email to the users/members
There is a file in forum/sources folder (named dogumgunu.php)
Within this file;
The path of Dogumgunu php file is .../forum/themes/default/Dogumgunu.template.php<?php
function DogumGunu ()
{
loadTemplate('Dogumgunu');
}
?>
So, finally when I execute/run this URL [qqq.mysite.com/forum/index.php?action=dogumgunu] it sends email
It is manuelly...
Does it an answer for your qoestion?
- 10-13-2011 #8Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Do you have to log in to the SMF page first, before loading your birthday page? I thought this was a webserver under your control...you may not be able to do this, as the client/server interaction provided by the browser is likely required for you to load the page properly.
A way to test that might be to just run firefox (assuming that is your browser) from the command line, loading the URL. First close all instances of your browser (and clear the cache too). Then run it from the command line:
Does that work as expected, w/o interacting w/the page at all?Code:firefox http://mysite.com/forum/index.php?action=dogumgunu
- 10-13-2011 #9Just Joined!
- Join Date
- Oct 2011
- Posts
- 5
No error log (I cant find)
When I put this command to the Crontab Command field
An e-mail arrived with this messageCode:firefox hxxx://qqq.mysite.com/forum/index.php?action=dogumgunu
/bin/sh: firefox: command not found
- 10-13-2011 #10Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Yeah, the apache error log is only for checking if you are running a local webserver - disregard.
Where is firefox installed? Is firefox what you are using to browse SMF?
Do this:
It is probably /usr/bin/firefox, but maybe not. Anyway, it is always good practice to use the full path to your commands/scripts/program in your cronjob.Code:which firefox
But, I would not put firefox in your cronjob in the first place. Just run that command from the terminal to see if it works at all.


Reply With Quote