ScrapingJobScheduler class

A scheduler for recurring scraping jobs

Constructors

ScrapingJobScheduler.new(AdvancedWebScraper _scraper, SharedPreferences _prefs)
Creates a new ScrapingJobScheduler with the given parameters

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelAllJobs() → void
Cancels all jobs
cancelJob(String id) → void
Cancels a scraping job
dispose() → void
Disposes the scheduler
getJobs() List<ScrapingJob>
Gets all scheduled jobs
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restoreJobs({void onResult(List<Map<String, String>>, String)?, void onError(Exception, String)?}) → void
Restores all jobs from storage
scheduleJob({required String id, required String url, required int interval, required Map<String, String> selectors, Map<String, String?>? attributes, void onResult(List<Map<String, String>>)?, void onError(Exception)?}) → void
Schedules a new scraping job
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create(AdvancedWebScraper scraper) Future<ScrapingJobScheduler>
Factory constructor to create a ScrapingJobScheduler from shared preferences