Running examples in ‘sched-Ex.R’ failed
The error most likely occurred in:

> ### Name: Scheduler
> ### Title: Class for scheduling web requests.
> ### Aliases: Scheduler
> 
> ### ** Examples
> 
> # Create a scheduler instance without cache
> scheduler <- sched::Scheduler$new(cache_dir = NULL)
> 
> # Define a rule with default values
> scheduler$setRule('www.ebi.ac.uk')
> 
> # Create a request object
> u <- 'https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity'
> url <- sched::URL$new(url=u, params=c(chebiId=15440))
> request <- sched::Request$new(url)
> 
> # Send the request and get the content result
> content <- scheduler$sendRequest(request)
INFO  [13:11:05.684] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:06.097] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:06.363] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:06.597] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:06.857] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:07.372] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:07.528] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:07.749] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:08.019] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:08.524] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
> 
> 
> ## ------------------------------------------------
> ## Method `Scheduler$new`
> ## ------------------------------------------------
> 
> # Create a scheduler instance with a custom default_rule
> scheduler <- sched::Scheduler$new(default_rule=sched::Rule$new(10, 1),
+                                   cache_dir = NULL)
> 
> 
> ## ------------------------------------------------
> ## Method `Scheduler$setRule`
> ## ------------------------------------------------
> 
> # Create a scheduler instance
> scheduler <- sched::Scheduler$new(cache_dir = NULL)
> 
> # Define a rule with default values
> scheduler$setRule('www.ebi.ac.uk')
> 
> # Define a rule with custome values
> scheduler$setRule('my.other.site', n=10, lap=3)
> 
> 
> ## ------------------------------------------------
> ## Method `Scheduler$sendRequest`
> ## ------------------------------------------------
> 
> # Create a scheduler instance
> scheduler <- sched::Scheduler$new(cache_dir = NULL)
> 
> # Define a scheduling rule of 7 requests every 2 seconds
> scheduler$setRule('www.ebi.ac.uk', n=7, lap=2)
> 
> # Create a request object
> u <- 'https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity'
> url <- sched::URL$new(url=u, params=c(chebiId=15440))
> request <- sched::Request$new(url)
> 
> # Send the request and get the content result
> content <- scheduler$sendRequest(request)
INFO  [13:11:08.751] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:09.021] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:09.283] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:09.555] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:09.827] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:10.098] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:10.364] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:10.857] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:11.111] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
INFO  [13:11:11.291] Error when retrieving URL content HTTP error 404 (""). When contacting URL "https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity?chebiId=15440". Retrying connection to server...
> 
> 
> ## ------------------------------------------------
> ## Method `Scheduler$downloadFile`
> ## ------------------------------------------------
> 
> # Create a scheduler instance
> scheduler <- sched::Scheduler$new(cache_dir = NULL)
> 
> # Create a temporary directory
> tmp_dir <- tempdir()
> 
> # Download a file
> u <- sched::URL$new(
+     'https://gitlab.com/cnrgh/databases/r-sched/-/raw/main/README.md',
+     c(ref_type='heads'))
> scheduler$downloadFile(u, file.path(tmp_dir, 'README.md'))
trying URL 'https://gitlab.com/cnrgh/databases/r-sched/-/raw/main/README.md?ref_type=heads'
Warning in utils::download.file(url = url, destfile = dest_file, mode = "wb",  :
  URL 'https://gitlab.com/cnrgh/databases/r-sched/-/raw/main/README.md?ref_type=heads': Timeout of 3600 seconds was reached
Error in utils::download.file(url = url, destfile = dest_file, mode = "wb",  : 
  cannot open URL 'https://gitlab.com/cnrgh/databases/r-sched/-/raw/main/README.md?ref_type=heads'
Calls: <Anonymous> -> <Anonymous>
Execution halted