LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-06-2003, 03:42 PM   #1
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
[PHP] Automated Jobs


Hi,

I need them to automated PHP updates of a MySQL database. Is their any way other than cron jobs I can automate PHP jobs? I would need to run it everyday.

Also I was just wondering what is the likelihood of a Hosting company giving me access to cron jobs so that i can run my own cron jobs?

TIA
 
Old 11-06-2003, 03:50 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
I would just use cron to schedule them.

Some hosts do give you cron access - just ask about.
 
Old 11-06-2003, 03:54 PM   #3
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
a cron job will not necessarly be enough. it would be best if there would be a commandline version of php installed that you could make use of ... otherwise there is hopefully lynx or similar installed...
 
Old 11-06-2003, 08:14 PM   #4
froZenX
Member
 
Registered: Sep 2003
Distribution: Fedora, Mandrake 9.2, dare I say a little of M$ Longhorn? Ha.
Posts: 52

Rep: Reputation: 15
If you can... cron the PHP file that you want to run to be run'ed everyday.

If thats possible.... lol.
 
Old 11-07-2003, 11:29 AM   #5
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
is there any other way to do it say if my client has a windows server?
 
Old 11-07-2003, 12:30 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Use scheduled tasks instead of cron.
 
Old 11-07-2003, 01:25 PM   #7
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
ok, cool so i just run get the scheduled task or cron job to run the following command:

php cronscript.php
 
Old 11-07-2003, 01:28 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If php is installed on your windows systme if the windows systme is not the webserver you could use lynx to execute it remotely.
 
Old 11-07-2003, 01:35 PM   #9
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
It is possible that my client could be hosting on Win 2003 or Redhat (i would prefer Redhat but in the end its not my call).

I wish to email users to tell them that their subscription to our service will expire in a month, week etc etc. This means that I would have to check the MySQL DB everyday for users that could be about to have their subscription expire and then send a reminder. Is cron/windows equivalent the only way?
 
Old 11-07-2003, 01:43 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Well what you want is to run a qurey at specified times and to do that you need some sort of scheduling agent like cron or scheduled tasks.
 
Old 11-07-2003, 03:34 PM   #11
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
looks like cron it will be
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache/PHP: Executing 'at' scheduled jobs? bomix Linux - Software 11 01-23-2009 01:02 PM
Automated Backups Matir Linux - Software 2 06-28-2005 08:55 AM
Daily Cron jobs with a PHP file Gargomel7 Programming 7 09-13-2003 07:21 PM
automated mailing dibyendra Programming 3 08-18-2003 12:25 PM
Automated HTML/PHP Generators? Breezwell Programming 0 08-07-2001 01:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration