Suggestions on python method needed in php
Posted: Mon Nov 06, 2006 4:13 am
Hi,
I have a php page which displays the entries stored in a logging database for applications that are being backed up on a server.
One thing that I am aiming to have on the php page is for it to display which process will be run next on the server.
These processes are called by the windows task scheduler.
I have written a python class which has a method for retrieving the next process that will run, out of the task scheduler.
At the moment, this method can simply return this process name / write it to a file / store it in a database.
My initial idea was to call the method every x minutes so that it updates the text file / database with the process name - which is then read by my php code - this seems a little intense.
It would make more sense for the python class to be called from my php script 'on demand', and for the returned value to be passed to the php script.
Can this be done and safely?
Thanks for any help in advance.
Here is a little diagram to help visualize what I am proposing:
Old method:
python > text file or database > php
New method
php > calls python
python > returns to php
I have a php page which displays the entries stored in a logging database for applications that are being backed up on a server.
One thing that I am aiming to have on the php page is for it to display which process will be run next on the server.
These processes are called by the windows task scheduler.
I have written a python class which has a method for retrieving the next process that will run, out of the task scheduler.
At the moment, this method can simply return this process name / write it to a file / store it in a database.
My initial idea was to call the method every x minutes so that it updates the text file / database with the process name - which is then read by my php code - this seems a little intense.
It would make more sense for the python class to be called from my php script 'on demand', and for the returned value to be passed to the php script.
Can this be done and safely?
Thanks for any help in advance.
Here is a little diagram to help visualize what I am proposing:
Old method:
python > text file or database > php
New method
php > calls python
python > returns to php