Jump to content


Photo

timed running of php file?


  • Please log in to reply
4 replies to this topic

#1 grandadevans

grandadevans
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts

Posted 13 March 2006 - 06:42 AM

Hi,
I have created a script to email users if it is their birthday. Is there a way that I can get the php file to run daily by itself on my web srever.
Thanks in advance,
John
Please sign our petition and support our troops<br />
<a href="http://www.postedove...ition.php"><img src="http://www.postedove...o_campaign.jpg" /></a>

#2 naskoo

naskoo
  • Members
  • PipPip
  • Member
  • 13 posts
  • LocationBulgaria

Posted 13 March 2006 - 07:51 AM

make it daemon in Linux or shedule task in windows ...

#3 fusionpixel

fusionpixel
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 13 March 2006 - 10:09 AM

[!--quoteo(post=354425:date=Mar 13 2006, 01:51 AM:name=naskoo)--][div class=\'quotetop\']QUOTE(naskoo @ Mar 13 2006, 01:51 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
make it daemon in Linux or shedule task in windows ...
[/quote]

In some other places they are called 'cron jobs' if you have access to your webserver look for that section.
Did you know there is a manual for PHP? [a href="http://" target="_blank"]http://www.php.net[/a]
Did you know there is a manual for mySQL? [a href="http://" target="_blank"]http://www.mysql.org[/a]

#4 grandadevans

grandadevans
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts

Posted 13 March 2006 - 12:11 PM

Hi,
Thanks for that.
I have just sent an email to 1&1 to see how I go about setting the cron jobs up.
In their FAQ it explains how to do it from a shell but it doesnt tell you how to connect to the shell.
Does anybody have any ideas as I know that 1&1 are particularly slow at responding.
If I need to do it from my system I am not using linux, I am using XP, does that matter?
Thanks again to all,
John
Please sign our petition and support our troops<br />
<a href="http://www.postedove...ition.php"><img src="http://www.postedove...o_campaign.jpg" /></a>

#5 mark s

mark s
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 13 March 2006 - 02:22 PM

I'm a 1 and 1 customer too.

You need to down load a program from your control pannel called. (Ive forgot)
But its what the recomemnd.

Down load that.

Run it from your desktop.
The settings you require should be on 1&1 for the connection.

Then you connect to your ssh
and you can then work out the comands to to time your script.

You make a script file which points to the file you want to do what ever.
and that's it.

I'm not at home now so i can send you settings etc or
point you in the right direction.

Message me your e-mail adress and i will get back to you later today.

My script automates a back up of my forums.

It did take me a while to get my head around cron jobs,
but after a while of practice.

I'm no expert but i should be able to help you get started with somthing simple.

My scriot if i remember right is CGI / Perl
as i wasnt sure if a Script file could be php or not.
But someone may answer that below.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users