This seems to be a generic error for an unspecified error so I was hoping for some help.
The script works, it works when run directly from within AppleScript and it works when run from LaunchControl and it works some of the time when scheduled.
@rosemaryjayne Hi the script is below. Thank you for your help, Regards, Ian.
on run
set todayDate to current date
set todayDate’s hours to 0
set todayDate’s minutes to 0
set todayDate’s seconds to 0
set tomorrowDate to todayDate + 1 * days
tell application "OmniFocus"
tell default document
set todayTasks to (flattened tasks where (defer date < tomorrowDate))
repeat with t in todayTasks
set t's flagged to true
end repeat
end tell
end tell
display notification "OF USER Script Completed @ " & (current date)
-- Lovingly crafted by David Sparks, The Omni Group, and Ben Waldie -- macsparky.com
-- Adapted by Ian Waddington
set theDate to current date
set theTask to "Script Ran - Check Actions - " & (theDate as string)
tell application "OmniFocus"
tell front document
set theContext to first flattened context where its name = "Any Device"
set theProject to first flattened project where its name = "Personal Single"
tell theProject to make new task with properties {name:theTask, context:theContext, flagged:true}
end tell
end tell