Have Julia send an email (or sound) when code is done

621 views
Skip to first unread message

Alex

unread,
Sep 18, 2014, 12:46:03 PM9/18/14
to julia...@googlegroups.com
Hi Everyone, 

Does anyone know of code that would have julia send an email or text at a certain point in a script. I'm sending some big projects of to a digital ocean droplet and I think this would be a nice thing to add so I can stop obsessively checking my code all day. Here's the stata code that makes it work:

stata -b 'yourdofile.do' && echo "done body" | mail -s "done subject" [youremail @ yourhost .com] &


 I've done with Stata pretty easily, but I can't quite get it to work with julia. Also with Matlab, it's pretty easy to make it "chirp" ("gong") when a code has successful (unsuccessfully) reached a point. Does anyone know how to do this? Here's the matlab code that makes it work:

load chirp
sound(y,Fs)


Thanks!

Alex

The stata trick was found via: http://scholar.harvard.edu/bauhoff/tricks.html

Jake Bolewski

unread,
Sep 18, 2014, 1:44:42 PM9/18/14
to julia...@googlegroups.com
Yo.jl 

Ivar Nesje

unread,
Sep 18, 2014, 2:19:50 PM9/18/14
to julia...@googlegroups.com
Yo.jl is not in METADATA.jl

You can use the twitter APIs tough, and there is a lot of online APIs that can send notifications.

There is also the ancient print("\x07") for your amusement, if you happen to be within reach of a BELL. 

Regards

Cameron McBride

unread,
Sep 18, 2014, 2:31:48 PM9/18/14
to julia-users

On Thu, Sep 18, 2014 at 1:44 PM, Jake Bolewski <jakebo...@gmail.com> wrote:
Yo.jl 

I thought this was a joke, but naturally, it does exist: 

Also, not really a julia question -- the "stata trick" should work just as well on julia (or anything that goes before the double ampersand).  However, that trick assumes the code exits successfully. 

To continue OT, there is also: echo -e '\a' (or echo ^G supposedly in Windows).
see, 

Cameron
In any case, also "echo "\

Iain Dunning

unread,
Sep 18, 2014, 2:47:44 PM9/18/14
to julia...@googlegroups.com

Mike Nolta

unread,
Sep 18, 2014, 3:30:44 PM9/18/14
to julia...@googlegroups.com
On Thu, Sep 18, 2014 at 12:46 PM, Alex <holli...@gmail.com> wrote:
> Hi Everyone,
>
> Does anyone know of code that would have julia send an email or text at a
> certain point in a script. I'm sending some big projects of to a digital
> ocean droplet and I think this would be a nice thing to add so I can stop
> obsessively checking my code all day. Here's the stata code that makes it
> work:
>
> stata -b 'yourdofile.do' && echo "done body" | mail -s "done subject"
> [youremail @ yourhost .com] &
>

So the following doesn't work?

julia yourjlfile.jl && echo "done" | mail -s "done" [email] &

-Mike
Reply all
Reply to author
Forward
0 new messages