Register

Mar 2006 02

Emailing upcoming actions to yourself

Luke Melia came up with an absolute gem of a tip on the tracks-discuss mailing list. If you enter the following command in your crontab on the server which runs your copy of Tracks 1.04, it will email you a list of the upcoming actions which are due within the next 7 days every day at 6 am (the command should be on one line, without the backslashes):

0 6 * * * /usr/local/bin/curl -0 http://[tracks_url]/feed/text/[username]/[your_token]?due=6 | /usr/bin/mail -E -s 'Tracks actions due in the next 7 days' youremail@yourdomain.com

It’s easiest if you copy and paste the URL of the text feed from your feeds page. Of course you can choose any feed you like—why not email a list of next actions in a particular project to a group of colleagues who are working on the project?

10 Comments

I like the idea of being able to be emailed for upcoming actions, but has anyone attempted this with a (I know ugh) Windows XP setup yet?
At this point in time I do not have the resources to have a Linux server available to me.

I used a program called mailsend.  Basically the same script, but, check the switches because they’re a little different.

Sweet!! Thanks for the reply.

I was able to get “Tracks” loaded and working on a Ubuntu box finally! I also have gotten the email portion working finally. The issue I am having now is that when I open the email I get a mesage:
“Sorry, you don’t have permission to view this page.”

I don’t understand why I would get that particular message.
Here is the feed:

Nov 9 06:00:01 localhost /USR/SBIN/CRON[12686]: (root) CMD (/usr/bin/curl -0 http://tracks:2000/feed/text/svms/1000?due=6 | /usr/bin/mail -e -s ‘Tracks actions due in the next 7 days’ apusateri@svms.***)

I can confirm that these no longer work with the current version of Tracks.

There appears to be no pull the NA or other items using curl, because it requires an active session cookie to function (and the whole structure and URL has changed significantly; no more username in the URI, etc.).

Back to the drawing board.

The url is different from that shown above, but the following is working for me with Tracks 1.7 on Centos 5.3:

0 6 * * * /usr/bin/curl -0 “http://[tracks url]/todos.txt?due=6&token;=[token copied from site]” | /bin/mail -s ‘Tracks actions due in the next 7 days’ [my email address]

Amend the location of the curl binary as necessary.

(delete semicolon from previous post and replace smart quotes etc. with normal quotes)

Hmm… the above results in cron sending out a useless progress meter email generated by curl.  Try the following instead:

0 6 * * * root /usr/bin/curl -s “http://[tracks url]/todos.txt?due=6&token;=[token copied from site]” | /bin/mail -s ‘Tracks actions due in the next 7 days’ [my email address]

Again, delete semicolon from previous post and replace curly quotes/apostrophes with normal quotes/apostrophes.  Stoopid ExpressionEngine.

You need to log in before you can post a comment. Please use the form at the top of the page to log in, or to register as a user.