Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Parameters to batch functions / timeout
Parameters to batch functions / timeout [message #3298] Wed, 09 January 2013 09:44 Go to next message
divico is currently offline  divico
Messages: 16
Registered: August 2008
Junior Member
Hi,
I have 2 brief questions:

1.) I have a few long running transactions which I implemented before the batch feature has been made available. I'm considering to migrate these to batch tasks.
Q: How exactly can I pass an online selection to the batch task (which according to the documentation should be possible: http://www.tonymarston.net/php-mysql/dialog-types.html#backg round)? Concrete example: I want to pass a file name (from a filepicker) to the batch. I think I can start the batch task from the filepicker with scriptNext() but I have no clue on how to obtain the selection (the filename from the filepicker) in my batch task.

2. According to http://www.tonymarston.net/php-mysql/radicore-security.html it should be possible to configure the session timeout value. Where actually can this be configured?

Thanks and regards
Re: Parameters to batch functions / timeout [message #3300 is a reply to message #3298] Thu, 10 January 2013 02:00 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
The session timeout is a PHP option - see http://www.php.net/manual/en/session.configuration.php#ini.s ession.gc-maxlifetime

Re: Parameters to batch functions / timeout [message #3301 is a reply to message #3300] Thu, 10 January 2013 02:21 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
Parameters for batch jobs are passed in the WHERE string, similar to online screens.

Re: Parameters to batch functions / timeout [message #3307 is a reply to message #3301] Thu, 10 January 2013 12:07 Go to previous messageGo to next message
divico is currently offline  divico
Messages: 16
Registered: August 2008
Junior Member
Coming back to my first question. The batch task that is generated looks as follows:

<?php
//********************************************************** *******************
// run a script in the background
//********************************************************** *******************

$stdout = '...';
$csvout = '...';
$pdfout = '...';

// ini_set('include_path', '.');
require 'std.batch.inc';

batchInit(__FILE__);

// custom code starts here

// custom code ends here

batchEnd();

?>

There are no parameters, respectively where clauses here ...

Thanks and regards
Re: Parameters to batch functions / timeout [message #3310 is a reply to message #3307] Thu, 10 January 2013 14:51 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
After the batchinit() function has executed you will see global variables called $where and $search.

Re: Parameters to batch functions / timeout [message #3410 is a reply to message #3310] Fri, 01 February 2013 22:03 Go to previous message
alida is currently offline  alida
Messages: 1
Registered: February 2013
Junior Member
Very good enough, thank you!

Previous Topic: Does Radicore allow orphaned children?
Next Topic: Passing URLs from _cm_formatData
Goto Forum:
  


Current Time: Tue Dec 03 11:43:11 EST 2024

Total time taken to generate the page: 0.03284 seconds