質問

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