setTimeout

void runnableScrapingSession.setTimeout ( int timeout ) (professional and enterprise editions only)

Description

Sets the timeout of the session. That is, after the given number of minutes have passed the session will automatically terminate.

Parameters

  • timeout An integer representing the timeout length in minutes.

Return Values

Returns void.

Change Log

Version Description
4.5 Available for professional and enterprise editions.

This method must be called before scrape.

Examples

Set Scrape Timeout

 runnableScrapingSession = new com.screenscraper.scraper.RunnableScrapingSession( "My Session" );

 // Sets the timeout of the session to 60 minutes.
 runnableScrapingSession.setTimeout( 60 );

 runnableScrapingSession.scrape();

See Also

  • getTimeout() [RunnableScrapingSession] - Retrieves the timeout for the session