PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 9th, 1999, 08:54 AM
Ulrik N
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hello again!

Is it possible to get a php3 script to check what day it is, and then do some stuff, If it’s let’s say Monday?
This without you doing anything. Like a background - or cronjob…
I guess you would use perl or something to do this, but that is not an option I have.!.


------------------
-ulrik-

Reply With Quote
  #2  
Old November 10th, 1999, 06:14 PM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Two options:

1) Compile the PHP CGI version (leave off --with-apache from the ./configure command) and then use CRON to run your script.

2) Use cron to call Lynx with the '-dump' command line option and the URL to the PHP page that does the work.

Reply With Quote
  #3  
Old November 17th, 1999, 11:34 AM
Ulrik N
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Err..

My access level is "user" meaning, I can't recompile anything, I do not have cgi-access... That is my problem.

The only thing I do have access to is php3.

Can you make a php3-script, that "sleeps" for 24 houres "wakesup" checks the date do some other stuff. "sleeps" ...... ect...




------------------
-ulrik-

Reply With Quote
  #4  
Old November 18th, 1999, 09:24 AM
rod k
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
The only way to do this is with a cron job. If your host doesn't allow this you're pretty much SOL.

A tricky alternative is to have this done by your index page (assuming your site is visited fairly often). Program in a time check and if it's past the time you want, include() the script you want run. Now, the first user to visit the index page after the "trigger time" will cause it to be run.

[This message has been edited by rod k (edited 11-18-99).]

Reply With Quote
  #5  
Old November 18th, 1999, 04:28 PM
Ulrik N
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Damm! I knew it..

Well I just have to convince somebody that it is a good idear, so that I can get my cron job.!.

See Ya'

------------------
-ulrik-

Reply With Quote
  #6  
Old November 18th, 1999, 05:45 PM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Well do you have shell access?? If so, you can compile your own copy of PHP in your home directory and then make cron jobs to run it as the interpreter instead of the system-wide copy of PHP.

Reply With Quote
  #7  
Old November 19th, 1999, 02:25 AM
Ulrik N
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Nope!

I have wery limited access to the system, meaning:
FTP
I have php3 as the only alternative to html...

------------------
-ulrik-

Reply With Quote
  #8  
Old November 19th, 1999, 07:08 PM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Do you know what type of hardware (Sun, Intel, etc) and what OS (FreeBSD, Solaris, Linux) your ISP runs?

If so, it's not too hard to find someone who'll compile a copy of PHP for you. Then all you should need to do is FTP upload the PHP executable and .ini file to your home directory and call it from there.

If your ISP runs Intel i386/Linux I'd be happy to send you a pre-compiled PHP.

[This message has been edited by jpenix (edited 11-19-99).]

Reply With Quote
  #9  
Old November 24th, 1999, 09:38 AM
Ulrik N
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hey

What a fine idear!

My ISP is running Intel with a Debian OS

Is that the info you need to compile a php3 for me.. :-)

But I still have to start the thing... NOT having access to cron jobs, how is that done...?



------------------
-ulrik-

Reply With Quote
  #10  
Old November 29th, 1999, 09:55 PM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hey Ulrik - Okay, I'm sure I could cough up an executable that'll run on x86 Debian.

Contact me off this board at jpenix@sbtpro.com and let me know what options you want compiled into the PHP (if any), and give me an email I can send the file to.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > running background job...

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap