Giter VIP home page Giter VIP logo

stata_sms's Introduction

Stata_SMS

  • Version 1.0
  • Date: July 18, 2014

Sends text message (SMS) after Stata has ended (completed the do file, stopped due to error in code, or crashed, etc.). This is useful if you're running a do file that will take a few hours to run and you want to know immediately when it finishes, runs into an error, or crashes.

System Requirements

Background

Many of my colleagues have expressed frustation when they start a .do file, expecting it to run uninterupted for hours, only to have it stop due to a coding error a little while after they move onto another task. Now we have a solution. This set of scripts will alert you as soon as Stata stops. While there are .ado files and other programs that allow you to utilize Python within Stata, what happens if Stata never reaches the line that calls on Python? Nothing! No notification at all. Now, with this set up you'll be alerted once Stata stops, no matter the outcome.

Description

This set of files will allow a text message (SMS) to be sent when the .do ends (either successfully or after running into an error, either way, a .log file will be produced and named after the .do file in the same folder as the .do file). There is an option to convert the .log file to .txt and have it emailed to you.. but this feature isn't relevant for sending a text message and more useful if you wish to receive an email with an attachement (which could be a .log file, graphics, or even a .dta file).

Set up

The default directory is C:\SMS\

  1. Download Stata_SMS-master and extract the Stata_SMS-master folder's run_me.bat and test.py files to the same folder as the .do file that you're planning on using.
  2. In run_me.bat..
    1. Update the path to your Stata installation in line 3. The default is set to "C:\Program Files (x86)\Stata12\StataSE-64.exe"
    2. On line 3, update the path to the .do file you'd like to run. The default is set to C:\SMS\test.do.
    3. On line 4, update the path to your installation of Python. The default is set to C:\Python27\python.exe
    4. On line 4, update the path to where you've extracted the test.py file to. The default is set to C:\SMS\test.py
  3. In test.py..
    1. On line 8, insert your email information into the relevant fields. The default is for gmail.
    2. On line 9, update the relevant fields. The '<author>' and '<message here>'field is optional, but you'll want to update the second field with either your phone number that will receive the SMS or the email you wish to send the alert to. the default is set to AT&T.

Notes for different carriers and email providers are listed in the URL in the python script.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.