Hi, I really wanted to have recurring tasks so I wrote a perl script which I can automate via a cron job. I leveraged the code by lkraven on “Create Tasks in Tracks via Email using the RESTFul API”, so I thought it would be good to share the results. As with lkraven’s post, this is not for the begineer. If you look inside the attachment you will see examples of adding a task with LWP. I was also querying and parsing the contexts and projects using LWP and XML::Simple which avoided the need to know the context or project id’s. The real magic comes from the Perl CPAN module Date::Manip. The basic idea is to map a hash to a task and add an extra key for a recurrence. The script is designed to execute once a day on a cron job, and if the recurrence of a given task ‘matched’ the present day, the task would be added to tracks. Date::Manip provides all the support for the date descriptions. The code seems to be too long for this page, and won’t attach, so I’ll try and include it via several posts.
3 years ago
May 27, 2009
Tracks | Perl Script to generate recurring tasks
