Check Election Planning

Fetch a page and update Plan to Vote:

(PRScheduledTaskExamples newForKernelNamed: 'Pier') reportCheck: [ :page | (PRPathLookup start: (PRKernel instanceNamed: 'Pier') root path: '/Blog/Social Tasks/Democracy Action/Plan to Vote') due > (Date today addMonths: 3) ] thenRetrieveLink: 'http://www.myborden.com/pier/blog/social-tasks/democracy-action/vote/election' using: [ :string |	| index voteTask | index := string indexOfSubCollection: 'There are no elections to display'. (index between: 10 and: string size) ifTrue: [ 'No elections in the near future' ] ifFalse: [ voteTask := (PRPathLookup start: (PRKernel instanceNamed: 'Pier') root path: '/Blog/Social Tasks/Democracy Action/Plan to Vote'). voteTask due: DateAndTime tomorrow. 'Need to plan to vote, see the *State Board of Elections>https://elections.il.gov*' ] ] onPageAt: '/Blog/Social Tasks/Democracy Action/Check Election Planning/Report'.

Report