[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Handle-info] Batch load



And to get rid of the offending handle you can add the following to your config.dct file(in the sever_config section). This allows server admins to have all permissions on all handles in the service.

"server_admin_full_access" = "yes"

Chap 5 in the Technical Manual.


Thanks Jane




At 07:14 PM 6/11/2007, Amit Chaudhary wrote:
Sharif Islam wrote:
Amit Chaudhary wrote:
Sharif Islam wrote:
Thanks.
Could this be setup  as a cron job?
java -cp handle.jar net.handle.apps.batch.GenericBatch <batchfile>
[<LogFile>]


There should be no problems in setting "java -cp handle.jar net.handle.apps.batch.GenericBatch <batchfile> <LogFile> " as a cron job.
For Unix environment you can create a shell containing the above command and add the shell to your CronTable
But be cautious if you don't make it dynamic i.e. a different log file name for each batch operation it might override the previous log file.


A better option would be to create your own service which executes HANDLE API GenericBatch and put that service in the cron this way you can better control
your process and the file names. You can even give your own XML input to your in-house service which in turn will transform it to <batchfile> format before executing.
Hi again,
When I run the batch file from the admin tool, it works fine after I provide the authentication information (using public key). But I am not sure how to include the authentication information in the batch file in order to run it from the command line. This is my batch file:


CREATE 10111/myhandle
1 URL 86400 1110 UTF8 http://en.wikipedia.org
AUTHENTICATE PUBKEY:300:0.NA/10111
/usr/local/hs/svr_1/admpriv.bin|passphrase

** # cat log.txt
Start Time: Mon Jun 11 13:44:19 CDT 2007
==>INVALID[3]: error in handle value index string
==>INVALID[3]: no handle values for 10111/myhandle
==>INVALID[4]: error in command line
Successes/Total Entries: 0/1
Batch File Lines: 4

any idea?

--sharif


_______________________________________________ Handle-Info mailing list Handle-Info@cnri.reston.va.us http://www.handle.net/mailman/listinfo/handle-info

Hi Sharif,


Your file has all the data required just the placement is wrong.

Try this:

AUTHENTICATE PUBKEY:300:0.NA/10111
/usr/local/hs/svr_1/admpriv.bin|passphrase

CREATE 10111/myhandle
1 URL 86400 1110 UTF8 http://en.wikipedia.org

By the way if you run the above batch file the 10111.myhandle will be created and locked in
because there is no HS_ADMIN field provided for its administration.


--
kind regards,

Amit Chaudhary.
Senior Developer,
PILIN Project, ARROW
Monash University Library
Building 4
Monash University VIC 3800 Australia
Tel   :  (+61 3) 9902 0344
Email :  amit.chaudhary@lib.monash.edu.au


_______________________________________________ Handle-Info mailing list Handle-Info@cnri.reston.va.us http://www.handle.net/mailman/listinfo/handle-info


_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info