Launchd: how to make a script run every weekday?

I'm trying to make a script run every weekday as a LaunchAgent. Is there a way to do this like you could in cron?
Here is the relevant portion of my LaunchAgent plist:
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>0</integer>
<key>Weekday</key>
<integer>3</integer>
</dict>
I have tried changing the Weekday integer to 1-5 or 1,2,3,4,5 but neither worked. It only works with a single integer. Do I have to create 5 separate plists for each weekday?
Any ideas?

Thanks VK, for others who are looking to do something similar, here is the relevant part of the code to make the command run every day (since that field is missing) at 7:00pm and 7:01pm:
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Hour</key>
<integer>19</integer>
<key>Minute</key>
<integer>00</integer>
</dict>
<dict>
<key>Hour</key>
<integer>19</integer>
<key>Minute</key>
<integer>01</integer>
</dict>
</array>

Similar Messages

  • How to make function that runs every t (min) minutes?

    The only one idea i have is endless cycle with checking system time... Any other ideas?

    Timer and TimerTask classes.

  • Have a bash script run every time an application is opened.

    Hi,
    On my Arch box I would like to have a bash script run every time a certain application is opened from the menu. I would prefer a delay of a 5 - 10 seconds after the program opens if that is possible. Could someone please let me know if and how I can achieve this?

    Problem is, OP wants the "meat" of his script to run after the program, which would mean putting it after the exec. But AFAIK, anything after the exec will be ignored. You could call another script to run in the background before the exec, but that seems hackish.
    Last edited by alphaniner (2013-04-10 14:57:01)

  • How to make a job run on a appointed node

    I have a problem. The database is Oracle 10g, RAC, two nodes
    There are some job which run on everyday night. Now, something happened, the job run on Node A can't work as normal, but if run on node B, It will work well.
    so I just want to submit the jobs on Node B, I submited the jobs on Node B, but the jobs always run on Node A.
    I want to know how to make a job run on a appointed node.

    the Job just transfer some procedure to add partitions for some table, to merge the records from some tables to one table and so on.
    the problem is when the job run on Node A, it is very very slow, the procedure would run hours and not success end, but if on Node B it will successfully end in seconds.
    restart the Node A would be a way for the problem, but may it will leave a hidden trouble. I want save the scene to find out the problem
    so can you help me

  • How to make a JApplet run in a Browser

    HI ALL:
    Can anyone tell me how to make a JApplet run in a IE.
    I am using JComponents and Visibroker for JAVA ORB for connecting to another ORB's which would in-turn connect to a C++ Server and finally to the SQL Server.
    I am getting a NoclassFoundException whenever I am running my JApplet.
    My code is >>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    <html>
    <head>
    <meta http-equiv="Content-type" Content="text/html;charset=iso-8859-1">
    <title>
    ORB ISSUE TRACKING SYSTEM
    </title>
    </head>
    <body>
    <Applet
         CODE="file://D:/IssueTrackingSystem/IssueTrackingSystem.class"
         Width=700
         Height=700
         Align=middle
    >
    <param name="CABBASE" value="IssueTest.cab">
    </Applet>
    </Body>
    </Html>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    The Cabase file is a winzip file having all the ORB's compliant classes and my source classes to interact with the ORB Server.
    Help is urgent.
    Regards
    Ritesh

    I have been having exactly the same problems but I was using JDK 1.2.
    I discovred the problem could be resolved by using the Plug-in on navigaor or IE and bingo it was perfect.
    I also discovered that using the AppletViwer would allow me to see the applet. Then I upgraded to JDK1.3 or 2 or whatever it is and nothing.
    I recompiled the classes using the !.3 still nothing. The applet vewer don't work and the plug in don't work.
    I tried to recompile using the oldjavac ( I assume 1.2) and nothing I do will make this JApplet run. Ordinary a�pplets are OK. Applications with swing are OK, but JAPPLets are dead
    I have come to the conclusion SUN has screwed up big time and are frantically scrabbling about looking for a fix. I have reveert to javascript/DHTML as this is both consistent and stable and for considerably less effort and aggravation you can get 90% of the functioonality.

  • How to make a loop run for specific period of time ?

    hello !
    i'm new to labview and could'nt found how to make a loop run for 2 sec for example, and then to exit.
    Solved!
    Go to Solution.

    Hi Hookso,
    You can do it using the different loops like While loop and For Loop. Roderic has already stated how to do it using a for loop. I have illustrated in the attached vi how to do it using a while loop and Elapsed Time function. Take a look.
    Regards,
    Nitzz
    (Give kudos to good Answers and Mark it as a Solution if your problem is Solved) 
    Attachments:
    Untitled 2.vi ‏36 KB

  • How to make tomcat still running after reboot

    hi all,
    i want ask about how to make tomcat still running after our computer reboot.
    so our server still can serve the the request without we start manualy the tomcat.
    please replies
    thank's before

    *nix or win32 or other?                                                                                                                                                                                                                                           

  • How to make Attribute Change run alignment & Hierarchy changes in Aggregat

    Hello
    I want to understand that How to make Attribute Change run alignment & Hierarchy changes in Aggregate?
    I posted previously the same question but there were not good answers and i was not able to understand clearly .....
    If there is Process chain XXY which makes Attribute change run for Master Data 0SPELLING ?
    Now there is Aggregate TRT which includes :
    0SPELLING , Fiscal Period , Purchase Product, Purchase Category ?
    Now pls answer following question ?
    1) Does the Process Chain XXY which makes only attribute change run alignment for 0SPELLING , Will this process chain automatically do the Change run alignment for 0SPELLING in Aggregate TRT ? YES or NO
    2) If Yes, then we are just suppose to do Roll up for Aggregate TRT after Process chian XXY completes and finish job ?
    3) If No, then what steps are suppose to be DONE so as to make sure that Aggregate TRT has new values and perfect values for 0SPELLING ?
    Please answer and coorect if i have any wrong question....

    for e.g.
    u have 0spelling whicha has attributes x,y and z on day 1 with 10 records
    so do ur aggregates on day1 with same values
    now on day2 u had new values of attributes y,z,s,d and new hierarchies and so u add new records
    with data load u will load the data with version M of modified and is not available for reporting
    If u do attribute change run then this modified version is activated to A i.e. active version .
    It will also do the change run alignment for Aggregate for new attribute values and new hierarchy values for aggregate.
    now in order for this data to be available for reporting u will need to do the roll up of aggregate.....
    if u roll up aggregate before attribute change run , new data is not avaialable for reporting
    if u roll up aggregate after attribute change run, then data is available for reporting
    if u dont roll up aggregate eventhough new data is in dataprovider, still new data will not be available for reporting.
    this is how it works

  • How to make Attribute Change run alignment & Hierarchy changes in Aggregate

    Hello
    I want to understand that How to make Attribute Change run alignment & Hierarchy changes in Aggregate?
    I posted previously the same question but there were not good answers and i was not able to understand clearly .....
    If there is Process chain XXY which makes Attribute change run for Master Data   0SPELLING ?
    Now there is Aggregate TRT which includes :
    0SPELLING , Fiscal Period , Purchase Product, Purchase Category ?
    Now pls answer following question ?
    1) Does the Process Chain XXY which makes only attribute change run alignment for 0SPELLING ,   Will this process chain automatically do the Change run alignment for 0SPELLING in Aggregate TRT ?         YES or NO
    2)  If Yes, then we are just suppose to do Roll up for Aggregate TRT after Process chian XXY  completes and finish job ?
    3) If No, then what steps are suppose to be DONE so as to make sure that  Aggregate TRT has new values and perfect values for  0SPELLING ?
    Please answer and coorect if i have any wrong question....

    for e.g.
    u have 0spelling whicha has attributes x,y and z on day 1 with 10 records
    so do ur aggregates on day1 with same values
    now on day2 u had new values of attributes y,z,s,d and new hierarchies and so u add new records
    with data load u will load the data with version M of modified and is not available for reporting
    If u do attribute change run then this modified version is activated to A i.e. active version .
    It will also do the change run alignment for Aggregate for new attribute values and new hierarchy values for aggregate.
    now in order for this data to be available for reporting u will need to do the roll up of aggregate.....
    if u roll up aggregate before attribute change run , new data is not avaialable for reporting
    if u roll up aggregate after attribute change run, then data is available for reporting
    if u dont roll up aggregate eventhough new data is in dataprovider, still new data will not be available for reporting.
    this is how it works

  • How to make keynote presentation run automatically

    how to make keynote presentation run automatically

    Keynote can enter play mode when the file is opened:
    Inspector > Document > Automatically play on opening

  • How to make mac desktop run faster . It is starting to freeze up in Safari sometimes.

    How to make IMAC desktop run faster.

    Mavericks is the Operating System, while you could call it a program it's the OS. We need to know:
    what year iMac you have including the amount of RAM installed, the capacity of the internal HD and how much is stored on it and under what conditions the computer runs slowly. Please CAREFULLY read Help us to help you on these forums

  • How to make a script for a terminal command

    I need to find instructions on how to create a script to automatically run the following Terminal command;
    Sudo chmod 755 /private/var/spool/cups. It will also need to include the admin password as you will be prompted to enter it after the command line is entered. Apparently the only way to get Quark 7 to print adobe pdf's is to open a terminal window and type the command every time the machine is rebooted. This is a temporary fix and I do not want the MAC users to have to type the command.
    Thanks
    Sal

    This Script works here. Get you the error, when you save or checks the syntax?
    When you use in AppleScript the entry with administrator privileges, is sudo optional. This says only, if everyone can use the sudo command inside of the 5 minutes limit without to write the password again or not.
    The Syntax do shell script "sudo chmod 755 "private/var/spool/cups" password "***" doesn´t work, because you need the entry with administrator privileges for the execution as privileged user.

  • How to make this example run on IE ?

    for example below :
    * LunarPhasesRB.java requires the following files:
    *    images/image0.jpg
    *    images/image1.jpg
    *    images/image2.jpg
    *    images/image3.jpg
    *    images/image4.jpg
    *    images/image5.jpg
    *    images/image6.jpg
    *    images/image7.jpg
    * It is a modified version of LunarPhases.java that
    * uses radio buttons instead of a combo box.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.net.URL;
    public class LunarPhasesRB implements ActionListener {
        final static int NUM_IMAGES = 8;
        final static int START_INDEX = 3;
        ImageIcon[] images = new ImageIcon[NUM_IMAGES];
        JPanel mainPanel, selectPanel, displayPanel;
        JLabel phaseIconLabel = null;
        public LunarPhasesRB() {
            //Create the phase selection and display panels.
            selectPanel = new JPanel();
            displayPanel = new JPanel();
            //Add various widgets to the sub panels.
            addWidgets();
            //Create the main panel to contain the two sub panels.
            mainPanel = new JPanel();
            mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS));
            mainPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
            //Add the select and display panels to the main panel.
            mainPanel.add(selectPanel);
            mainPanel.add(displayPanel);
         * Get the images and set up the widgets.
        private void addWidgets() {
             * Create a label for displaying the moon phase images and
             * put a border around it.
            phaseIconLabel = new JLabel();
            phaseIconLabel.setHorizontalAlignment(JLabel.CENTER);
            phaseIconLabel.setVerticalAlignment(JLabel.CENTER);
            phaseIconLabel.setVerticalTextPosition(JLabel.CENTER);
            phaseIconLabel.setHorizontalTextPosition(JLabel.CENTER);
            phaseIconLabel.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createLoweredBevelBorder(),
                BorderFactory.createEmptyBorder(5,5,5,5)));
            phaseIconLabel.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createEmptyBorder(0,0,10,0),
                phaseIconLabel.getBorder()));
         //Create radio buttons with lunar phase choices.
         JRadioButton newButton = new JRadioButton("New");
         newButton.setActionCommand("0");
         newButton.setSelected(true);
         JRadioButton waxingCrescentButton =  new JRadioButton("Waxing Crescent");
         waxingCrescentButton.setActionCommand("1");
         JRadioButton firstQuarterButton = new JRadioButton("First Quarter");
         firstQuarterButton.setActionCommand("2");
         JRadioButton waxingGibbousButton = new JRadioButton("Waxing Gibbous");
         waxingGibbousButton.setActionCommand("3");
         JRadioButton fullButton = new JRadioButton("Full");
         fullButton.setActionCommand("4");
         JRadioButton waningGibbousButton = new JRadioButton("Waning Gibbous");
         waningGibbousButton.setActionCommand("5");
         JRadioButton thirdQuarterButton = new JRadioButton("Third Quarter");
         thirdQuarterButton.setActionCommand("6");
         JRadioButton waningCrescentButton = new JRadioButton("Waning Crescent");
         waningCrescentButton.setActionCommand("7");
         // Create a button group and add the radio buttons.
         ButtonGroup group = new ButtonGroup();
         group.add(newButton);
         group.add(waxingCrescentButton);
         group.add(firstQuarterButton);
         group.add(waxingGibbousButton);
         group.add(fullButton);
         group.add(waningGibbousButton);
         group.add(thirdQuarterButton);
         group.add(waningCrescentButton);
            // Display the first image.
            phaseIconLabel.setIcon(new ImageIcon("images/image0.jpg"));
            phaseIconLabel.setText("");
           //Make the radio buttons appear in a center-aligned column.
            selectPanel.setLayout(new BoxLayout(selectPanel, BoxLayout.PAGE_AXIS));
           selectPanel.setAlignmentX(Component.CENTER_ALIGNMENT);
            //Add a border around the select panel.
            selectPanel.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createTitledBorder("Select Phase"),
                BorderFactory.createEmptyBorder(5,5,5,5)));
            //Add a border around the display panel.
            displayPanel.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createTitledBorder("Display Phase"),
                BorderFactory.createEmptyBorder(5,5,5,5)));
            //Add image and moon phases radio buttons to select panel.
            displayPanel.add(phaseIconLabel);
           selectPanel.add(newButton);
           selectPanel.add(waxingCrescentButton);
           selectPanel.add(firstQuarterButton);
           selectPanel.add(waxingGibbousButton);
           selectPanel.add(fullButton);
           selectPanel.add(waningGibbousButton);
           selectPanel.add(thirdQuarterButton);
           selectPanel.add(waningCrescentButton);
            //Listen to events from the radio buttons.
           newButton.addActionListener(this);
           waxingCrescentButton.addActionListener(this);
           firstQuarterButton.addActionListener(this);
           waxingGibbousButton.addActionListener(this);
           fullButton.addActionListener(this);
           waningGibbousButton.addActionListener(this);
           thirdQuarterButton.addActionListener(this);
           waningCrescentButton.addActionListener(this);
        // Load the selected image (lazy image loading).
        public void actionPerformed(ActionEvent event) {
           phaseIconLabel.setIcon(new ImageIcon("images/image"
                                  + event.getActionCommand()
                                  + ".jpg"));
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create a new instance of LunarPhasesRB.
            LunarPhasesRB phases = new LunarPhasesRB();
            //Create and set up the window.
            JFrame lunarPhasesFrame = new JFrame("Lunar Phases");
            lunarPhasesFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            lunarPhasesFrame.setContentPane(phases.mainPanel);
            //Display the window.
            lunarPhasesFrame.pack();
            lunarPhasesFrame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }i know run above example on command line while i don't how to make run on IE ?
    because mostly people are used to look at sth on IE ?
    so i think it's important to runs javacode on IE .
    who can help me ?
    thanks!

    If you want it to execute inside a web browser then you need to convert it to an applet. Alternatively you can investigate Java Web Start.

  • How to make my script ignore pages 1 and 2?

    Hi all. I'm a complete beginnger at all of this so thank you in advance for all you're help, I really appreciated it.
    I have a JavaScript that I've been working on, and with help from people on here it's working really well. I uses a combination of GREP expressions and checks the entire document and then applies pre-made Character Style that have been set up in the InDesign Templates. (By the way I'm using CS6).
    My latest problem is that I don't want this to affect page 1 or 2 as the templates are layed out in spreads so these are the front and back cover.
    Is there a way I can get the script to ignore page 1 and 2?
    If not, I thought another way round would be to only have the script run on highlighted text, but I'd prefere to just ignore pages 1 and 2.
    Any and all help would be greatly appreciated.
    Thanks again,
    Scorpio

    Hi Scorpio17523 and Kai,
    > As far as I know, it is not possible to search for specific pages?
    My guess is that you can, in fact, use Pages.itemByRange(2,-1)... in order to reach a valid plural specifier that holds a findGrep (or changeGrep) method—like TextFrame or Paragraph. This is a powerful way to run a GREP query in a single command.
    Say you want to apply some character style (MyCharStyle) to every word that begin with a 'A' or 'a', considering all textframes except those of page 1 and 2 (i.e. index 0 and 1). This can be done in a single pass without any loop, as shown below:
    // Your settings
    var GREP_PATTERN = '\\<[aA][\\l\\u]+';
    var CHAR_STYLE_NAME = 'MyCharStyle';
    // Variables
    var doc = app.activeDocument,
        cStyle = doc.characterStyles.itemByName(CHAR_STYLE_NAME),
        target = doc.pages.itemByRange(2,-1).textFrames.everyItem().paragraphs.everyItem(),
        nr;
    // Set GREP, and run!
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = GREP_PATTERN;
    app.changeGrepPreferences.appliedCharacterStyle = cStyle;
    nr = target.changeGrep().length;
    alert( nr + " expressions have been changed." );
    The important part is:
    target = doc.pages.itemByRange(2,-1).textFrames.everyItem().paragraphs.everyItem()
    This allows to filter page indices 0 and 1 inside the specifier. As a result, target is a 'plural' Paragraph object which represents every desired text and can then invoke its changeGrep() method.
    Note that we could as well invoke changeGrep() from a plural TextFrame—i.e.: ...textFrames.everyItem()—but the GREP command will lead to a runtime error if some textframe of the collection is empty. That issue does not occur if one extends the specifier to ...paragraphs.everyItem()—unless all the frames are empty!
    Hope that helps.
    @+
    Marc

  • How to make powershell script.

    How to make script that copy content from notepad to other notepad and reverse the text?

    If you mean a .txt file then there's three aspects to your question.
    Open a file and read the text
    Reverse the text
    Save the text into a new file
    For point one, this technet article is good:
    http://technet.microsoft.com/en-us/library/ee692806.aspx
    For point two you could turn the text into one or more strings, then convert those into arrays, loop through them and then re-assemble them. This article shows you most of that:
    http://technet.microsoft.com/en-us/library/ee692804.aspx
    And finally you need to save that text as a file, there's lots of ways but the Out-File cmdlet is the simplest.
    This might also be of use:
    http://www.ehow.com/how_7174023_write-basic-powershell-script.html

Maybe you are looking for

  • WebUtil and "This page cannot be displayed"

    Hi, After installing WebUtil, using the steps in the Familiarization manual and the notes in the Readme.txt file, when I ran a previously working form in the Builder, Internet Explorer complains the page cannot be displayed. I have reviewed the insta

  • How to make iPad 2 look like new?

    Hello I want to reset all settings, apple id and other things. I want him to look like new. Delete all information. How I can do it ?

  • Help with servlet

    I have a project with servlets in the 2 following folders myprojects and myclasses In my projects I have the helloProject and inside it I have the helloHtml folder and the helloPackage. So in the helloHtml folder I have the hello.html file and in the

  • Kernel panic on MacBook Pro 2012

    I keep getting this panic error code on an endless cycle of rebooting: panic(cpu 2 caller 0xffffff8021fbcf35): "process 1 exec of /sbin/launchd failed, errno 2"@/SourceCache/xnu/xnu-2782.18.72/bsd/kern/kern_exec.c:4868 Debugger called: <panic> Backtr

  • AE2020 Windows 8 touch screen troubles

    I did a fresh intall of Windows 8.  The touchscreen does not work. I installed the IdeaCom Touch Screen 3.3.4200.04 Driver.  the hardware does not show up in it's utility. Also it did not install the Coprocessor driver correctly.  Showing an error in