Skip to content

Commit

Permalink
More regular for checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dean-breed committed May 31, 2022
1 parent c26769c commit 7bef2e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Take a snapshot of budget data
on:
# Run every hour
schedule:
- cron: "0 * * * *"
- cron: "*/5 * * * *"

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions iati_marker.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ while(length(docs)==1000){
res = content(req)
docs = res$response$docs


filename = paste0("budgets-",Sys.Date(),"-",format(Sys.time(),"-", format = "%H"),"-", format(Sys.time(),"-", format = "%M"))
for (index in c((start_num+1):(start_num+1000))){
if ((index-start_num)<=length(docs)){
results_list[[index]] = docs[[index-start_num]]
Expand All @@ -50,7 +50,7 @@ while(length(docs)==1000){
message(length(docs))
}

filename = paste0("budgets-",Sys.Date(),format(Sys.time(),"-", format = "%H"))

saveRDS(results_list, file=paste0(filename,".RData"))

# We now have a dataset of iati-identifiers with their budget information for all budgets 2021 onwards.

0 comments on commit 7bef2e5

Please sign in to comment.