Running batch jobs [message #5045] |
Fri, 09 October 2015 21:50 |
edortizq
Messages: 82 Registered: August 2008 Location: Ecuador
|
Member |
|
|
Dear Tony, I'm trying to run my first batch job, so I created a task using the BATCH pattern, then I try some testing code truncating some tables but nothing happens, when I try to debug my script it never stops on the breakpoints wich are on the generated script.
I'm trying to run this batch task by pressing a navigation button from a multi5 task.
However it's definitely running something because it shows a batch_log_filepicker task after pressing the button and I can open the html output file.
The testing code is:
<?php
//********************************************************** *******************
// run a script in the background
//********************************************************** *******************
$stdout = '../logs/detallemuestras.html';
$csvout = '../logs/detallemuestras.csv';
$pdfout = '../logs/detallemuestras.pdf';
ini_set('include_path', '.');
require 'std.batch.inc';
batchInit(__FILE__);
$conn1millaQry = mysqli_connect('localhost', 'remoto', 'inp1milla', 'unamillaqry');
if (!$conn1millaQry) {
die('No se puede conectar a DB UNAMILLAQRY: ' . mysql_error());
}
echo 'Conexion Exitosa a UNAMILLAQRY'.'<br>';
mysqli_query($conn1millaQry,'TRUNCATE TABLE artespesca');
mysqli_query($conn1millaQry,'TRUNCATE TABLE componentes');
mysqli_query($conn1millaQry,'TRUNCATE TABLE detallemuestras');
mysqli_close($conn1millaQry);
batchEnd();
?>
The html output file (detallemuestras.html) only have this:
user_id : MGR
role_id : GLOBAL
What I'm doing wrong?
Thanks for advance!!
Best regards,
Edgar
|
|
|