Automated Tasks

Created the page to document automated tasks:


The ToDo Pier app has a dependency on Sean DeNigris's Scheduler so that it can run tasks at specific times. This is done by:

  1. first creating a normal task, and adding reformatted code to execute, such as:

    (PRScheduledTaskExamples newForKernelNamed: 'Pier') reportOfHistoryOnPageAt: '/John Borden/Todo/Add a History Report/Report'.

    Be sure to check the kernel name, it is case sensitive. If the wrong name is given, it will create a new kernel (and more problems later). It can be checked with:

    PRKernel instances size.  "Should be 1"

  2. Create the report page (in this example /John Borden/Todo/Add a History Report/Report). This can be an empty page.
  3. In the Pharo image, execute:

    (PRPathLookup start: (PRKernel instanceNamed: 'Pier') root path: '/John Borden/Todo/Add a History Report') automate.

    This will change the task to be marked as completed and hidden from the menus. If the task was given a repeat duration, it will execute the above code with that frequency.

Once several tasks are automated like this, it is valuable to add a report of tasks, such as:


Run every 90 minutes:

Report generated on Oct-01 4:59 am

Task NameNext RunRun Count
Add a Scheduler Report2026-10-01T04:59:00-05:001992
Update Overdue Repeating Tasks2026-10-01T23:59:00-05:00130
Wiki Health Check2026-10-01T04:59:00-05:00256
Find Broken Links2026-10-01T23:59:00-05:00130
Add a History Report2026-10-01T05:59:00-05:001009
Print Wiki Load to File2026-10-01T05:15:00-05:005756

(PRScheduledTaskExamples newForKernelNamed: 'Pier') reportOfSchedulerAt: '/John Borden/Todo' onPageAt: '/John Borden/Todo/Add a Scheduler Report/report'.


There are concerns with how secure this is, but no problems have been identified after running this for several years.

Posted by John Borden at 20 April 2018, 11:20 am link