Commit 110abadb40060a3d79edc24b9ecb4e72c75574f4

Authored by Conrad Vermeulen
1 parent 3e7f7efb

KTS-2525

"Create windows service to wrap around scheduler"
Implemented.

Committed By: Conrad Vermeulen
Reviewed By: Kevin Fourie


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7434 c91229c3-7414-0410-bfa2-8a42b809f60b
bin/win32/installScheduler.php 0 → 100644
  1 +<?php
  2 +
  3 +$dir = realpath(dirname(__FILE__) . '/schedulerService.php');
  4 +
  5 +win32_create_service(array(
  6 + 'service' => 'ktscheduler',
  7 + 'display' => 'KnowledgeTree Scheduler Service',
  8 + 'params' => $dir
  9 + ));
  10 +
  11 +?>
0 12 \ No newline at end of file
... ...
bin/win32/schedulerService.php 0 → 100644
  1 +<?php
  2 +
  3 +
  4 +$dir = realpath(dirname(__FILE__) . '/..');
  5 +chdir($dir);
  6 +
  7 +$phpPath = realpath('../../../php/php.exe');
  8 +if (!is_file($phpPath))
  9 +{
  10 + die('Cannot find php.exe');
  11 +}
  12 +
  13 +
  14 + win32_start_service_ctrl_dispatcher('ktscheduler');
  15 +
  16 + while (WIN32_SERVICE_CONTROL_STOP != win32_get_last_control_message())
  17 + {
  18 + system("$phpPath scheduler.php");
  19 + sleep(60);
  20 + }
  21 +
  22 +?>
0 23 \ No newline at end of file
... ...
bin/win32/schedulerServiceStatus.php 0 → 100644
  1 +<?php
  2 +
  3 +var_dump(win32_query_service_status('ktscheduler'));
  4 +
  5 +?>
0 6 \ No newline at end of file
... ...
bin/win32/uninstallScheduler.php 0 → 100644
  1 +<?php
  2 +
  3 +win32_delete_service('ktscheduler');
  4 +
  5 +?>
0 6 \ No newline at end of file
... ...