Applescript ical event at specific time of day

I'm trying to find a way to have a script create an iCal event for a day away. I use (current date + 1 * days) but this creates the event one day away at the time the script runs. is there a way to create the event one day away at 8:00am each time?

The current date includes the time, so you can just set the time separately, for example
set theDate to ((current date) + 1 * days)
set time of theDate to 8 * hours
theDate -- > next day at 8:00AM

Similar Messages

  • Applescript running at a specific time of day

    I have a headless server. If it fails to shut down I want to run script that would force it to shut down.
    The shut down script I have.
    tell application "System Events"
    shut down
    end tell
    or if needed
    do shell script "shutdown -h now" password "YourAdminPwd" with administrator privileges
    However if I would like his to execute at lets say 24.00 hours what would I need to do to have that happen?
    Do I need to have it run to do so?
    What script?
    See I do not want to use iCall to execute it as this might be the reason the shut down failed in the first place (the server sometimes hangs on shut down as a programme wants a confirmation). and than the script does not run (is what is happening at the moment if I simulate a hanging program)
    Thanks

    Thanks Andrew for your help
    Andrew99 wrote:
    I trust you're aware of the consequences of the "quit without saving" command -- any open documents with unsaved changes will be lost -- but it would appear that this is not an issue for you in this case. Others should be forewarned.
    I am and yes no issue as the server is doing its stuff 'serving'. if it hangs on lets say an email, it wil send it again next time it is up as Mail has it already in the outbox. (mail gets generated by a script, so it could only hang because of my internet connection being down). ditto with Fax, answering machine print-servers etc.
    Andrew99 wrote:
    In repeated tests, I intentionally left unsaved documents open in both Mail and TextEdit. On a schedule I chose in iCal, each time, as hoped for, all applications quit and my Mac immediately shut down, and did so without an application warning or a shut down warning dialog appearing.
    it works for me too!
    Andrew99 wrote:
    tell application "Finder"
    shut down
    end tell
    If my scripting knowledge is correct, than this line is the equivalent of me telling the machine to shut down using te 'Shut Down' command. correct? this is not a "Killall" type command?
    So it is normal 'soft' shut down, the only difference being that it skips the dialogue box bit.
    Am I correct?
    And thanks for taking the time!

  • How do I schedule a task at a specific time of day, every day?

    I am trying to use Timer and TimerTask to schedule an event at specific time of the day. It will basically stop all the logging archive the log file and start a new logfile.
    I am just having trouble with scheduling it for every day at specific time (I am new to java and have not worked with date and time much). If someone can point me to some sample code or show me a brief example I would really appreciate it. I am about to pull my hair.
    Thanks in advance!!!

    hi
    I assume you use the swing class. As you suggest, to schedule an event you have to use a timer. The delay of the timer can easy be calculated using GregorianCalendar objects. Create one for the current date/time by instantiating an object. Create a second and set the date to the next schedule date/time. Retrieve the milliseconds from both objects and calculate the differences.
    best regards
    benny

  • Scheduling specific time of day for automatic software updates

    How can one schedule a specific time of day (i.e. between 11:01 pm to 5.59 am when I have unlimited download availability) for an iMac to search for automatic software updates? System preferences only offer frequency, but no time option. If it is possible to schedule a specific time, will invoking the feature override the sleep function, wake up the machine and perform the software update and then let the machine go back to "sleep?" Thank you for all your help.

    to clarify barney's suggestion, the following terminal command will download all available updates and put them in your Downloads folder.
    softwareupdate -d --all
    so what you need to do is this.
    1. turn off automatic software update in software update system preferences.
    2. make a cron or a launch daemon to run the above terminal command periodically at the time of your choosing. to make a launch daemon I recommend using lingon http://tuppis.com/lingon/
    The daemon will only run if the computer is not asleep at the scheduled time so you might want to set to to wake/start shortly before that. this is done in system preferences->energy saver->schedule.
    to install the updates once they are downloaded double-click on the pkg files and follow the instructions.

  • Render at a Specific Time Every Day

    Is there a way to have a specific Final Cut Pro project to render automatically at a specific time every day?
    I work at a CG house, and shots are updated at random intervals, but are always in a fixed, specific location. So by rendering out the project everyday we would always have an up to date complete edit. And by automating it it could be rendered off hours and be ready first thing in the morning for review.

    Or page 548 of Volume III, if you're on Final Cut Pro 5 (FCStudio 1).
    'Main Menu/Final Cut Pro/User Preferences/General tab'
    FCS2 may allow specific time of day, but FCS1 simply lets you set a period of time (while the program is open, but idle). So set it for 2 hours, leave FCP open when your last editor leaves the office.
    This also offers several choices on which sequences you actually want to 'auto-render'.
    K

  • Is it possible to schedule updates for a specific time of day like 12am?

    Is it possible to schedule updates for a specific time of day like 12am?

    No. If you use Automatic Updates, the apps update when the updates are available. Read this for a little more information.
    http://9to5mac.com/2013/09/20/ios-7-how-to-set-up-automatic-app-updates/

  • Is there a specific time of day that the BTO iMacs become available for pickup?

    As I am sure many people can relate to, I find myself hitting the refresh screen on my Apple order page awaiting the arrive of a built-to-order 27" iMac (3.4 GHz/ 32GB memory/ 3TB fusion/ 680MX graphics). Question for people with an inside scoop.... do the custom macs arrive a specific time of day (many retailers have scheduled deliveries at specic times during the day). The reason I ask is because if my Mac is only going to become "available for pick-up" in the morning, I will know that after... let's say 10am.. there is no reason for me to keep checking because I will know it won't be showing up on this specific business day, if it hasn't already. Any insight on how this works? Thanks fellow Apple fans!

    Goodness gracious.... Not even 5 minutes after I replied to you, my item became available for pickup! It's like they were listening in! haha !

  • Start a process at a specific time of day

    Is there any kind of a time mechanism that will allow a process to be started at a specific time each day?

    There is not a scheduling mechanism native to LC/ADEP. A valid approach would be to use a cron job or WMI (Windows Management Instrumentation) to start a batch file that calls a Java class that uses the LC Java API to invoke the short-lived process.
    See http://help.adobe.com/en_US/enterpriseplatform/10.0/programLC/help/index.html
    Invoking Document Services Using APIs > Invoking Document Services Using the Java API > Quick Start: Invoking a short-lived process using the Invocation API
    Steve

  • Quit an Application at a specific time each day.

    I know how to do something as simple as Quiting an application with AS, but what if I want to run it at say 7pm everyday. Not using iCal.
    Any Ideas?

    You can use the unix-side launchd application to trigger execution of an application at a specific time. In your case you'd want it to launch an AppleScript that tells your other app to quit.
    Programming launchd to do this is easy with an app like Lingon (http://lingon.sourceforge.net/), which provides a gui to set schedules in launchd.
    I use to run two applescripts every 30 seconds and a third one once an hour. Works a treat... and it's free.
    Robert

  • Expire all local cache entries at specific time of day

    Hi,
    We have a need for expiring all local cache entries at specific time(s) of the day (all days, like a crontab).
    Is it possible thru Coherence config ?
    Thanx,

    Hi,
    AFAIK there is no out of the box solution but certainly you can use Coherence API along with quartz to develop a simple class that can be triggered to remove all the entries from the cache at certain time. You can also define your custom cache factory configuration and an example is available here http://sites.google.com/site/miscellaneouscomponents/Home/time-service-for-oracle-coherence
    Hope this helps!
    Cheers,
    NJ

  • Scheduling process chain 3 specific times a day

    Hi ,
    my requirement is to schedule a process chain 3 times a day.
    i have gone through the forum and got the solution EVENTS.
    please provide me how to do this in detail like step by step.
    how to create a event in SM64 and how we will define the time there.
    and creating a ZPROGRAM with the function module (please provide step bystep).
    thanks
    Sridhar

    You create user events in SM62.  In SM62, next to "User even names", click on <b>Maintain</b> and press Enter.  Click on the Create icon to create a new event (let's call it ZEVENT).
    Next, in your process chain, change the Start variant to be scheduled "After event", and put in ZEVENT for the event name.  Also, click on the "Periodic job" at the bottom.  This will automatically reschedule the jobs for the process chain after it executes.
    Next, create an ABAP program (let's call it Z_EVENT_RAISE) to call the function module BP_EVENT_RAISE.  You're code can look like this:
    REPORT Z_EVENT_RAISE.
    PARAMETERS: P_EVENT LIKE TBTCO-EVENTID.
    CALL FUNCTION 'BP_EVENT_RAISE'
    EXPORTING
    EVENTID = P_EVENT.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This ABAP program will prompt for an event name, so you will need to create a variant (let's call it ZEVENT) which will save the value of the event name (also ZEVENT).  You will need the variant name to be able to trigger the event in a batch job.
    Now all you need is the batch job.  Use tcode SM36 to create a batch job where you call the ABAP program (Z_EVENT_RAISE) using the variant (ZEVENT).
    Note, SM64 only triggers an event manually.
    Does this help?
    Oh, and you can copy this job to schedule it three times a day.
    Message was edited by:
            Geo

  • Doing something at a specific time of day

    Hi all,
    Basically what I am doing is an alarm clock, to wake me up to some MP3s. It all works fine.
    My only concern is the following:
         private Thread tTimeCheck = new Thread() {
              public void run () {
                   while (true) {
                       cal = new GregorianCalendar();
                       int hour24 = cal.get(Calendar.HOUR_OF_DAY);
                       int min = cal.get(Calendar.MINUTE);
                       if (hour24 == JSelectHour.getValeur() && min == JSelectMinute.getValeur()) {
                            playMusic = true;
                       } else {
                            playMusic = false;
                       try {
                            t.sleep(1000);
                       } catch (InterruptedException e) {
         };Is it unefficient to check every second, to see if the time of day is equal to the set time on the alarm clock? It seems to me that there has to be a better way to do this.

    Thank you for your reply.
    This is my thread that plays the music.
    while (true) {
       if (playMusic && jpnl.getAlarmStatus() == 1) {
           testPlay("C:/Documents and Settings/Seb/Desktop/Music/01-nirvana-smells.like.teen.spirit.mp3"); //hardcoded for now
    }testPlay is executed the the entire song plays before the next iteration.
    Next step: I'll look to put this in the taskbar (windows tray / whatever it's called), never done that before =)
    Thanks,
    Message was edited by:
    Robocrotch

  • Allow RDS Logon during Specific time of day

    Is there a way that we restrict Logon to our Terminal Server so that users can only Logon between specific times...?
    We are using windows Server 2008 R2
    for example between 8AM and 6PM

    You could set up a scheduled task to enable drain mode on the server which will prevent new logons (but not reconnections), This task woud set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\TSServerDrainMode to 2.  No new sessions
    could be started but disconnected users could reconnect.  Admins ca still connect by running
    mstsc /admin.   Then you would need another scheduled task to disable drain mode, by settinge the above key back to 0.
    HTH,
    Jeremy

  • How can I set iTunes to check for new podcasts at a specific time of day?

    Hi guys,
    Anybody know a work around for this? I thought it was just a matter of clicking the refresh button at the time I want iTunes to look for new podcasts, but it doesn't seem to be the case...
    I want iTunes to look for new podcasts at 2 am every day. So, at 2 am, I clicked the refresh button in the Podcasts section in iTunes. It would then say, in the settings, that iTunes last checked for podcasts at 2 am and will look again at 2 am the next day. Awesome, not. Every single time I try this, iTunes always resets itself and decides to look for podcasts at 2:49 pm. I can't work it out.
    So, if anyone has a solution, I would love to hear it! I'm on the latest version. 9.0.2. Thanks for reading.
    Regards,
    Daniel

    I'm looking for the solution to this issue too. Once or twice, a full system restart has seemed to solve the problem temporarily but it slips back to an afternoon refresh after a few days.
    Seems like it would be simple for Apple to allow us to specify a time of day for refreshes in the preferences section.

  • FDM Script - Set to run at a specific time of day??

    Can you set an FDM script to run at a certain time of day (based on
    server time)? I've currently got a Custom/General script I'd like to
    run once a day at a set time.
    Thanks!

    You need the use task manager for that.
    I suggest you look in the admin guide for more info.
    If I’m not mistaken, you need to enable in the application setting and then you can use it from the tools menu in the Workbench.

Maybe you are looking for

  • Push not working in my app

    W released a Push Enabled app recently. Although several users have purchased the app, we are seeing NO TOKENs being sent to our servers. We are unclear on what is going on? 1. We built the app on the 3.0 SDK application for Device 2.0, but as we are

  • It takes forever to make a phone call go thru.Often does not get thru. Hard for others to hear me.

    Both iPhone 4 and iPhone 5 in same plan can't place calls or when call goes thru the other person can't hear me. I went to the Verizon store and they are replacing the iPhone 4 but suggested I go to Apple store(ugh!) to get replacement of whic I know

  • Rough cuts from Prelude lack audio source

    Hey everyone, this is my first project with a Prelude to Premiere Pro workflow and so far everything worked just fine. Although after creating a couple of rough cuts in Prelude and sending them to Premiere Pro I am experiencing a problem with the imp

  • Flash works very slow

    Well, flash video (for example, an Youtube) works slow.

  • Perfermance Issue

    Hi All, I have one procedure is running in one database which is taking 2 urs. But same procedure (sama data volume,same execution plan) is taking 4 hours in another database. Both system are different and it is in window OS. Could some please clarif