문제

I have a php file test.php. I want to run it with Open Source Job Scheduler at specified intervals. How can I do that? Should I create a xml file for it?

I read the documentation

http://www.sos-berlin.com/mediawiki/index.php/How_to_execute_a_PHP_script_with_JS

But my doubt is that how do I run a file located at certain folder instead of writing the code in xml file. Should I write include script include "test.php"; in xml file? Can any one help me please?

도움이 되었습니까?

해결책 2

I found the solution from their document it self.

Refer

http://www.sos-berlin.com/mediawiki/index.php/Creating_a_Job

<?xml version="1.0" encoding="iso-8859-1"?>
<spooler>
  <config>
    <jobs>

       <job name = "my_shell_script">
          <process file  = "my_shell_script.sh"
                   param = ""/>
          <run_time repeat = "3600"
                    begin  = "00:00"
                    end    = "24:00"/>
       </job>

     </jobs>
   </config>
</spooler>

The job named "my_shell_script" will be started every hour (see ) and will execute the script my_shell_script.sh (see ).

다른 팁

If your php file is executable then yes. You can simpely do include in the php code.

Also try to google for CRON JOBS if you use linux server.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top