1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

PHP How do I combine Cron Jobs PHP files?

Discussion in 'Web Development' started by gwsuk77, Jul 17, 2009.

  1. gwsuk77

    gwsuk77 New Member

    Hi,

    Can anyone please help me combine my Cron Jobs PHP files?

    I have two Cron Job PHP files that I would like to combine into one.

    a) cron_send.php

    b) cron_expand.php

    I would like to set it up so that when ( cron_send.php ) completes, it will call in and start ( cron_expand.php )

    Is it possible to call in and execute several cron job files from within one php file.

    Cron_send.php already has an include as follows...

    set_time_limit(0);
    include("inc.all.php");

    Would the following include command work to call in ( cron_expand.php ) once ( cron_send.php ) completes..

    include("inc.all.php,cron_expand.php");

    I will appreciate any help at all.

    Many thanks,

    Frederick Malick
     
  2. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    What type of server are you running on?
    Is your PHP installed as CGI or as an Apache module?
     
  3. gwsuk77

    gwsuk77 New Member

    Hi ishkey,

    Thank you for your reply.

    PHP installed as CGI and am running on windows xp.

    Thanks,

    Frederick
     
  4. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    My web server is an "apache running linux"

    My home pc's have several different operating systems such as XP, VISTA, RED HAT, more.

    I still need to know - What type of "WEB SERVER" are you running on? Not your personal operating system.
     
  5. bmcoll3278

    bmcoll3278 New Member

    To combine the two cron jobs is easy. I assume either one works right now. so just open both files in notepad take the one you want to run second and just paste it in at the bottom of the first file. so as the first one finishes it goes right into the next. That should work just fine. Just save a copy of each file as backup. If you have a problem with it send me the files and I will combine them into one for you.