#1
  1. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    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-
  2. #2
  3. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  4. #3
  5. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    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-
  6. #4
  7. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    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).]
  8. #5
  9. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    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-
  10. #6
  11. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  12. #7
  13. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    Nope!

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

    ------------------
    -ulrik-
  14. #8
  15. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    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).]
  16. #9
  17. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    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-
  18. #10
  19. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    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.

Similar Threads

  1. running a script, after one script gets done running
    By sc_dan in forum Perl Programming
    Replies: 1
    Last Post: February 7th, 2004, 11:32 PM
  2. running multiple daemons 4 apache2 on freebsd 5.2
    By cwbpirate in forum BSD Help
    Replies: 0
    Last Post: January 12th, 2004, 02:36 AM
  3. Problems running external program through Perl
    By Duncs in forum Perl Programming
    Replies: 1
    Last Post: January 5th, 2004, 02:45 PM
  4. Possible to have 2 background images?
    By lull45209 in forum HTML Programming
    Replies: 0
    Last Post: December 17th, 2003, 04:46 PM
  5. XP Pro running Slo
    By wangsta in forum Windows Help
    Replies: 1
    Last Post: December 4th, 2003, 02:24 PM

IMN logo majestic logo threadwatch logo seochat tools logo