• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript schedulers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript schedulers


  • Subject: Re: Applescript schedulers
  • From: Paul Scott <email@hidden>
  • Date: Sun, 18 Nov 2007 16:32:28 -0800

when the MBP is sleeping when the "event time" nothing happens.
How do you handle this problem?

With anacron for example. See <http://en.wikipedia.org/wiki/Anacron>.


On Leopard, and I think Tiger IIRC, the cron job will run *after* the
machine wakes from sleep if it was sleeping when it should have run.
I just now ran a test to prove it.

crontab:

4  *  *  *  *  echo "Hello world!"

The job should run at 4 minutes after the hour.

I slept the computer at 2 minutes after the hour. Then, at just shy of
8 minutes after the hour I woke up the computer. The job ran and e- mailed
me the results (notice the time):


From: hidden email (Cron Daemon)
To: hidden email
Subject: Cron <pscott@paul-scotts-imac> echo "Hello world!"
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=pscott>
X-Cron-Env: <USER=pscott>
X-Cron-Env: <HOME=/Users/pscott>
Message-Id: <20071119000759.C9997122709@hidden-email>
Date: Sun, 18 Nov 2007 16:07:59 -0800 (PST)

Hello world!

This is, of course, different than what happens with cron on BSD, and I don't
know what tolerance OS X's cron uses, but I do recall that when I was running
Tiger, my jobs that were scheduled to run at 8a.m. were sitting in my e-mail
inbox when I woke up the machine at 9:30a.m., although I never actually
checked the run time and it's possible that they had run because the machine
woke up for some other reason (wake-on-lan or wake-on-modem). Still, this
recent test on Leopard shows that cron won't ignore a job that wasn't run
during sleep. There are potential problems with this approach if you weren't
expecting it. I suggest you run your own tests and compensate as required.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Applescript schedulers
      • From: Jan Erik Moström <email@hidden>
    • Re: Applescript schedulers
      • From: Sander Tekelenburg <email@hidden>
References: 
 >Re: Applescript schedulers (From: Jan Erik Moström <email@hidden>)
 >Re: Applescript schedulers (From: Sander Tekelenburg <email@hidden>)

  • Prev by Date: Re: Applescript schedulers
  • Next by Date: Re: Leopard Date Bugs
  • Previous by thread: Re: Applescript schedulers
  • Next by thread: Re: Applescript schedulers
  • Index(es):
    • Date
    • Thread