PHP Classes

File: jobScript.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Manooj Kumar Dhar  >  Multi Threading, Daemon (Windows service)  >  jobScript.php  >  Download  
File: jobScript.php
Role: Example script
Content type: text/plain
Description: this file will receive all the paramets sent by the windows service using the multithreading process and process the further execution
Class: Multi Threading, Daemon (Windows service)
Create Windows service to run daemons
Author: By
Last change:
Date: 6 years ago
Size: 747 bytes


Class file image Download

* Created on 31/10/2008
* @author Manooj Kumar Dhar
* (...)
* This part of code is simply called by window service
* Receives the parameters sent by window service and then fires the Database Query to fetch the result

// I am creating the semaphore file
$filename = dirname(__FILE__).'/count/process' . trim(rand(10000,9999999999)) . '.proc';
$file = fopen($filename, 'w');

// There I am putting the arguments array into a string (just to write the content in a file)
$ret_str = ob_get_contents();

// Arguments passed in the thread are received here as follows:


// I am deleting the semaphore file