Automating AppViz Downloads

AppVizI’m going to be out of the office for a week. Including the two weekends, that means 9 days, and the App Store daily reports are only maintained for 7 days so that would mean losing 2 days of data in AppViz, the amazing tool from IdeaSwarm that I use to keep track of sales and reviews etc. What to do?

Well, three options came to mind:

  1. Accept the loss of data (AppViz will fill in the missing information to some extent from the weekly reports, so it is only really a loss of resolution);
  2. Take a laptop, find an internet connection on my trip and download the data files to there (AppViz can read the downloaded files);
  3. Find a way to schedule the AppViz to download the data on its own while I’m away.

The first two options didn’t appeal much, so I asked on Twitter if anybody had any ideas for scheduling AppViz. And two people responded with the information I needed (thanks @jonathanbenari and @graiz). So, without further ado, here’s what I did:

Recording an Automater Workflow

  1. Enable access for assistive devices in System Preferences -> Universal Access so that Automater can record your actions;
  2. Launch Automater;
  3. Launch AppViz, if it isn’t already running;
  4. Hit the Automater record button;
  5. Bring AppViz to the front;
  6. Choose the Data -> Import from web menu option, and let it complete that;
  7. Stop recording in Automater;
  8. Save your new workflow as an Application (make sure you choose Application and not Workflow for the type);

Scheduling the Download
iCal SchedulingWe’re going to schedule the saved workflow to run every morning at 6:31am (we’ll see why it is 6:31am in the next section). So, here’s what we need to do:

  1. Launch iCal;
  2. Add a new event at 6:31am (or whatever time you want to schedule the download for);
  3. Set the entry to repeat to every day;
  4. In the Alarm section, choose Open File;
  5. In the line that appeared below Open File (and says iCal), click and choose Other. You will be asked to pick the file here, so pick the Application format file you saved in Automater earlier;
  6. Set the time before the event to be 0 minutes;
  7. Click Done to schedule the event;

And that’s it scheduled. If you leave your computer on all the time, you’re done at this point. If however, you’re being nice to the environment and you put your computer to sleep (or have it set to sleep automatically), iCal won’t be able to run your script since the computer will be asleep. Let’s fix that next…

Wake From Sleep
Energy Saver ScheduleRe-open the system preferences and choose the Energy Saver option. In there you will notice a button labeled Schedule… – press it and you will be able to choose a time for your computer to wake up, and a time for it to go to sleep. I chose to have it wake up 6:30am and go back to sleep at 6:45am (15 minutes ought to be long enough for AppViz to download any new reports). This also explains the 6:31am time on the iCal alarm – 1 minute after the machine is woken from its sleep by the energy saver!

And that’s it. Now my machine will wake up, download the daily reports from Apple, and go back to sleep all on its own, leaving me free to enjoy my vacation without having to find an internet connection to download the data files.

5 thoughts on “Automating AppViz Downloads

  1. Excellent work! I’m going to link to this from @AppViz; I’m sure it will help out a lot of users. Making this easy is still on my list, but this is a great stop gap solution to the problem that can be used now.


    – Dylan

  2. BTW, launching the app with the mouse seems to give unexpected results if I am working when the script is launched.

    Just build a simple automator script that uses the launch application command (with Appviz obviously) then record the Command+I keystroke.

  3. You can also use The only downside is giving a 3rd party your iTunes connect password but they seem honest enough.

  4. You should check out which works automatically every morning and even sends out reports by email daily. Pretty nifty tool – You dont have to leave your computer on and you can check it from anywhere when you’re not in the office.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.