Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8813157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:46:30+00:00 2026-06-14T03:46:30+00:00

I have an Automator workflow to ping a server, and download the latest copy

  • 0

I have an Automator workflow to ping a server, and download the latest copy of a schedule that I frequently use. This schedule then is copied to my dropbox so I can view it on my phone. Before the workflow downloads the newest schedule it deletes the old schedule from dropbox.

This works well, except when I don’t have an active internet connection. When I don’t have an active internet connection, the workflow will still open up dropbox, delete the old schedule, and try to download the newest one. Because there is no connection, it doesn’t download anything. Then if my connection becomes active the empty dropbox will sync and the schedule will be deleted from my phone.

I’m trying to add a few lines of applescript code to ping a server to see if i have an active connection. If I don’t, then wait about 5 seconds and ping again. I want to have 5 ping attempts and at that point if i still do not have an active connection then I want to quit entirely.

I’m very new to applescript, so I’m getting hung up on how to handle an error from a command, in this case, the ping. If command “ping -o http://www.apple.com” fails, wait 5 seconds and retry the ping. If 5 failed attempts then quit entirely.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:46:31+00:00Added an answer on June 14, 2026 at 3:46 am

    Maybe something like this?

    repeat with i from 1 to 5
        try
            do shell script "ping -o www.apple.com"
            exit repeat
        on error
            delay 5
            beep
            if i = 5 then error number -128
        end try
    end repeat
    say "Connected"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an automator workflow with a Run Applescript action. Is it possible to
I have created an Automator workflow service (not Automator application!) under Mac OS X
I'm trying to create a simple Automator workflow that will prompt me for where
I have tool that creates variables for a simulation. The current workflow involves hand
I have a Windows Workflow application that uses classes I've written for COM automation.
I have tried creating an application in Automator that when double clicked, will tar
I have developed a .Net Library that uses the Core Service. This library is
I have an Automator Application containing the action Show Growl Notification, which is always
Ok, I have created a little utility with AppleScript and used Automator to turn
Is there a way in rst to have automatic header numbering ? That is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.