launchd guard reappearance of script task

OS 10.10.5 Yosemite

I have a plist to run a script once a day at 03:35.  Unfortunately, as soon as the script ends, it is restarted, over and over again. Since it is an administrative task, to be run by root, the plist is in/library/LaunchDemons /.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.rukbat.neptune</string>
    <key>ProgramArguments</key>
    <array>
        <string>/bin/sh</string>
        <string>/usr/local/etc/neptune-backup.sh</string>
    </array>
    <key>StartCalendarInterval</key>
    <dict>
        <key>Hour</key>
        <integer>3</integer>
        <key>Minute</key>
        <integer>35</integer>
    </dict>
</dict>
</plist>

I tried add / remove several different entries for people with disabilities, KeepAlive, StartInterval, you name it.  No matter what I do, whenever I have to "load" the plist with LaunchCtr, the script starts running.  If I manually kill the process, it simply restarts.  What's cute, it's that I copy a 4 GB file over a network connection.  As soon as the copy is complete, the script restarts, reset the file and copy it again.  I can do all kinds of stuff, like the verification of the existence of the file, to work around this problem.  However, I would rather know what I'm doing wrong with LaunchD.

I suspect your script ranges in the background, which would mean launchd couldn't tell if it was running or not. See the man page launchd.plist (5).

Tags: Mac OS & System Software

Similar Questions

  • Problem of Migration to SSIS 2005 to 2014 Script tasks

    Hello

    I need to spend some 75 packages SSIS SQL 2005 a 2014 SQL.

    In these packages are a large number of script tasks.

    If the Script task only contains the Modules/Classes folder root for the Script task, migration works almost without mistakes.

    If there are subfolders within the Script task (for a better overview), all classes in the subfolders are not migrated (ignored).

    If the dtsx file looks like this (it will be ignored for 2014):

    File struckture is

    Root

    Work_Sheet

    NameList

    If it looks like:

    This works.

    It looks like a bug to me.

    Is there a way to avoid this next change each package and each scripttask?

    Kind regards

    Chris

    Ask here:

    Msdn - SQL Server - Microsoft forums - development

    or here:

    Forums Technet - SQL Server - Microsoft - it professionals

    Hope that helps

  • Using a function of an Action in a script task

    Hello

    I am new to vCO and Java Script and I was wondering if I could call an action in a script task.  Basically, I create a workflow is the integration with vCAC and I want to take on the properties of the Virtual Machine and change the variable names to invoke a soap for another service request.  I see that there is in the getPropertieFromVirutalMachine plugin can I call this action in my scriptable task to do an update in my scritpable work to reset the varibles? Essintally I want to know if I could do something like this:

    (I know it does not work)

    Var properties = new Properties ();

    Properties.put ("VirtualMachineID", virtualMachine.virtualMachineID);

    var vmProperties = {}

    applicationResolver = getPropertyFromVirtualMacine (host, virtualMachine, "property");

    };

    System.log (applicationResolver)

    or what I need to do another way through the vCAC entities

    var prop = System.getModule("com.vmware.library.vcac").getPropertyFromVirtualMachine (host, virtualMachine, propertyName);

  • How to put vmGuestOsIdentifier in a script task?

    Hello

    I'm struggling with the development of my fo VM creation workflow.

    As you know, when you create a virtual machine, the guestOS must be set.

    At first, I defined the type of entry to vmGuestOsIdentifier, but that doesn't look nice, because IDS are not exactly like the OS - original names (for example "winLonghorn"'s "Windows Server 2008 32-bit").

    I created a list of all the names of BONES, which are used on our virtual machines, set the entry to the string type and the value of the list as a list of predefined items.

    However, I still need to have a variable of vmGuestOsIdentifier type that needs to be fixed, but now in a script task.

    And that's what I'm struggling with.

    How can I set the vmGuestOsIdentifier in a script task?

    Thank you and

    Concerning

    Andreas

    HI Andreas,

    My bad. I should use the documentation carefully. The fromString method aims to convert a well known in enum enum value. For example, it can be used as

    VcVirtualMachineGuestOsIdentifier.fromString ("darwin64Guest")

    This will result in

    VcVirtualMachineGuestOsIdentifier.darwin64Guest

    On the other hand, because the column description http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html by must be located so the VC VC plugin objects,

    the VC itself exposes the same values. So everyone who wants friendly names must handle this case by case.

    So in your case since you have friendly names, you should bind to the VcVirtualMachineGuestOsIdentifier of the specific values. Ugly hack, but it's the current implementation. I'm sorry.

    Kind regards

    -Martin

  • launchd works but the script is run?

    I have looked for answers here, but could not find them. So my question is this: I created a launchd like this: com.schedule.arp.plist

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.schedule.arp.plist</string> <key>ProgramArguments</key> <array> <string>/Library/Scripts/arp.sh</string> </array> <key>StartInterval</key> <integer>300</integer> </dict> </plist>

    I can see that the computer runs every 5 minutes as it should. Here is the console:

    Apr 21 09:46:39 eps-amsterdam com.apple.xpc.launchd [1] (com.schedule.arp.plist [2946]): Service came out with abnormal code: 1 Apr 21 09:51:39 eps-amsterdam com.apple.xpc.launchd [1] (com.schedule.arp.plist [3274]): Service came out with abnormal code: 1 Apr 21 09:56:39 eps-amsterdam com.apple.xpc.launchd [1] (com.schedule.arp.plist [3554]): Service came out with abnormal code: 1 Apr 21 10:01:39 eps-amsterdam com.apple.xpc.launchd [1] (com.schedule.arp.plist [4156]): Service came out with abnormal code: 1

    The actual script is here:/Library/Scripts/arp.sh it contains the following:

    #!/bin/sh sudo php56 /opt/local/apache2/htdocs/epsamsterdam/arpreach_full/a.php cli/auto

    But this last part is not executed? Manual to hit this command in the terminal works very well. So where should I go wrong? I am running to El Capitan 10.11.4

    First, if the job should run as root, it should be in/Library/LaunchDaemons with appropriate permissions (owned by and writable only by root). Eliminate the 'sudo' to the script. Provide the full paths to 'php56' and ' cli/auto '.

  • Advance Mac cleaner guard reappear after the move to the trash.  How can I permanently delete?

    Please indicate how to permanently remove the malware Advanced Mac Cleaner.  He keeps reappearing when I move to the trash, empty the trash and restart my computer.  Help, please!

    the developer should have information on their Web page. dragging to the trash will not uninstall it because it has processes that run when your computer is active, not just at the time when you start the application manually.

  • Deleted mail Guard reappear in my box in apparentlt randomly

    I frequently receive advice I have new mail only to find that new mail is actually mail dating back to a few days or a few weeks. This can be 1 mail or several emails, maybe up to 30 and is a real nuisance, any advice most welcome, thank you. This alone affecting Thunderbird, not Bell / Sympatico.

    Deleted messages may reappear if the folder has not often been compacted.

    If you compact your folders regularly, can slow performance to a crawl, you cannot store new messages more, begin to lose parts of messages, or deleted messages resurrected.

    Suggest you move all good emails out of the Inbox to other folders appropriate to the organization.
    Then, delete all the emails you want.
    Right-click on the Inbox, and then select "compact".

    Then empty the deleted folder.
    Also empty and compact the junk e-mail folder.

  • An automatic download XP seems installs correctly but then guard reappear.

    I use windows XP with automatic updates all and with all the major updates installed, but in the last ten days an update is automatically downloaded and when I stopped the computer he said that downloading was ready to be installed. He confirmed afterwards he did and turns off automatically.

    However, the next day the icon was still there and I tried several times to install manually again. Whenever he went through the process, confirmed that it was installed properly and icon, then apparently disappeared. However, whenever I stop it goes through the same process without actually editing it. He always keeps doing exactly the same thing every time I try it manually too.

    I don't know how to remove the download and try to re-do it. Any help would be appreciated!  MIKE

    Mike,
    We need more detailed information as requested by PA Bear.  However, you can review these items because they can help.
    Troubleshooting Windows Update: offered on several occasions to update

    Reset the Windows Update components

    Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • MS Windows XP Update KB 286 2330 has installed every day - last 2 weeks - guard reappear to update again! Why?

    keep to receive the update of ms KB for 286 2330, have removed this piece and re-installed. However, he returned for the last 2 weeks? Why and how do stop this repeated Ms. Update!

    Finally, here is what worked for me:
    Go to: Start-Settings-Control Panel - Add or remove programs.
    Once the list fills, scroll to the bottom of the list a KB2862330 discovery.
    Remove this update, as well as all this that followed and that just before KB2862339.  Some of the pop up windows will have a small check box asking if you want to do not restart the computer after you remove the update.  Check the box so that the computer does not restart until you are done to remove these updates.
    After you remove the, shut down the computer, wait 20 seconds, and then restart.
    After this restart, go to: start Windows Update and let it pick up and reload the updates.

    If this does not work, try again but this time not to restart the computer.  Just remove the updates and then go to Windows Update.

    Good luck.
    JDD06

  • How to fill a table/CompositeType script task?

    I want to be able to fill the table/CompositeType with input params that a user fills out.  Someone of you have sample code for this?

    Thank you

    -Stephen

    Figured it out in case anyone else wants to know...

    entries = new Array();
    var jsObj = {name: 'provider - VirtualMachine.CPU.Count', value: '2'};
    inputs.push (jsObj);

    var jsObj1 = {name: 'provider - Cafe.Shim.VirtualMachine.NumberOfInstances', value: '1'};
    inputs.push (jsObj1);

    var jsObj2 = {name: 'provider - VirtualMachine.Memory.Size', value: "8096"};
    inputs.push (jsObj1);

  • A task to wait another script task

    If I use the following code:

    Get - vm myvm | stop-vmguest-confirm: $false | set-vm - numcpu 2 - memoryGB 4 - confirm: $false | Start-vm

    Will be there always wait for instructions set - vm to complete before trying the virtual machine turns on again or should I add some kind of a statement "wait"?

    The Set-VM must be completed prior to the start-VM will run.

    Only when you add the RunAsync switch, then the following cmdlet will be executed immediately, without waiting for the 1st cmdlet to complete.

  • Reference failed with "Agent already has a script execute task"TaskId (SCRIPT, attbid, BaselineUpdate)"

    Hello

    EndecaScriptService service script fails with the following exception when you try to run indexing. I checked is there is any job stuck in InMemoryQueue but none. Please let us know how to fix the error below. Script only service fails, but the records are loaded into the record store. As a temp work around we run the base with in short.

    ProductCatalogSimpleIndexingAdmin - atg.repository.search.indexing.IndexingException: failed to start application attbid BaselineUpdate script

    ProductCatalogSimpleIndexingAdmin to atg.endeca.eacclient.ScriptRunner.startScript(ScriptRunner.java:277)

    ProductCatalogSimpleIndexingAdmin to atg.endeca.eacclient.ScriptIndexable.runUpdateScript(ScriptIndexable.java:262)

    ProductCatalogSimpleIndexingAdmin to atg.endeca.eacclient.ScriptIndexable.performBaselineUpdate(ScriptIndexable.java:202)

    ProductCatalogSimpleIndexingAdmin to atg.endeca.index.admin.IndexingTask.doTask(IndexingTask.java:421)

    ProductCatalogSimpleIndexingAdmin to atg.endeca.index.admin.IndexingTask.performTask(IndexingTask.java:364)

    ProductCatalogSimpleIndexingAdmin to atg.endeca.index.admin.IndexingPhase$ IndexingTaskJob.invoke (IndexingPhase.java:476)

    ProductCatalogSimpleIndexingAdmin to atg.common.util.ThreadDispatcherThread.run(ThreadDispatcherThread.java:178)

    ProductCatalogSimpleIndexingAdmin caused by: an error occurred trying to start the script: Agent already has a 'TaskId (SCRIPT, attbid, BaselineUpdate)' execute script task: Agent already has a task of running script "TaskId(SCRIPT,attbid,BaselineUpdate)".

    ProductCatalogSimpleIndexingAdmin at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)

    ProductCatalogSimpleIndexingAdmin at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

    ProductCatalogSimpleIndexingAdmin at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

    ProductCatalogSimpleIndexingAdmin to java.lang.reflect.Constru

    Can you try to kill the forging process running and then try again the kickoff of basic indexing?

  • The guard Explorer shortcut icon appear on my desktop. Cannot remove it.

    Help remove the icon on the desktop. Guard reappear after deletion.

    It is not possible and advisable to remove IE on Windows XP.

    It is possible to do it on more recent versions of Windows.

    On Windows XP best you can do is to disable the shortcut on the desktop and access to EI.

    See 'Hide the Internet Explorer desktop icon':

  • Why does the login screen Windows continue reappear on my monitor?

    I use Windows 7 Pro.  Until a few months ago, I couldn't leave my desktop PC on overnight.  As soon as I sat down and moved the mouse or tap a key on the keyboard, my screen saver would disappear and I could go right to work.  It was great!  Several months ago, a problem started that I describe.

    Now, when I walk away from my PC for a few hours and return, I see the Windows login screen.   It is not all the time, but it produces most of the time.   My first step in tackling the problem was to check the settings of the screen Setter.  The bomber of the screen ("ribbons") is supposed to go after 12 minutes of inactivity.

    There is a box to the right of this setting that says 'On Resume, display the login screen'.  This box is averified.

    Then I adjusted to High Performance power settings.  PC display is Never set for when to turn off the screen and also never to when putting the computer to sleep.   I then changed the advanced power settings to try to remedy the problem.  I made sure the following settings are the following:

    High Performance requires no password on wake up.

    Turn off the hard drive at the end of 800 minutes

    The sleep settings:

    Sleep after = never

    Allow hybrid sleep = Off

    Hibernate after = never

    Enable timers wake = Disable

    Turn off the display = never

    Power button: Sleep button Action = Nothing

    For security reasons, I usually use my PC as a standard user.  But the login screen Windows guard reappear after I leave my PC for a while if I run as a limited user or administrator of the master.

    Can you give me some additional ideas on what I can do to remove the login screen Windows reappear after I leave my PC?

    Hello

    Thank you for your reply with the requested information, sorry for the delay in response.

    I suggest you follow the steps below:
    1. on your desktop "Windows + R" screen press button together press
    The Board of Directors.
    2. in the command box type run 'control userpasswords2' click OK.
    3. uncheck the box for "users must enter a user name and password
    This computer '.
    4. change the screen saver 'Ribbons' to something else for example
    'Bubbles '.
    5 restart the computer.
    Now, check if the problem reappears.
    Hope this helps, please answer with the results for assistance.
  • Script to get the tree of data center

    Hi all

    I want to return a complete tree of data through script task centers.

    example:

    Datacenter1:

    CLUSTER1:

    Host1:

    Host2:

    VM1:

    VM2

    When I try to enumerate the data center to get this Cluster fails. Can anyone help on this?

    MyScript:

    var myDatacenters = VcPlugin.getAllDatacenters ();

    for each (i = 0; i < myDatacenters.length; i ++)

    {

    for each (mycluster in myDatacenters [i] .cluster)

    {

    System.Debug (cluster. (Name)

    for each (myHostSystem to myCluster.host)

    {

    System.Debug (myHostSystem.Name);

    for each (myVMs to myHostSystem.vm)

    {

    if(myVMs.isTemplate==true)

    {

    System.Debug (myVMs.Name);

    }

    }

    }

    for each (myDatastore to myCluster.datastore)

    {

    System.Debug (myDatastore.Name);

    mytotalDatastoreCapacity += myVcDatastore.summary.capacity;

    mytotalDatastoreFreeSpace += myVcDatastore.summary.freeSpace;

    }

    }

    }

    Hi LuckyT,

    There is no attribute VcDatacenter.cluster, you could use VcPlugin.getAllClusterComputeResources () instead.

    But I found a code on my environment facing maybe also your needs:

    for each ( var myDatacenter in VcPlugin.allDatacenters ) {
      forEachChildEntity ( myDatacenter );
    }
    
    function forEachChildEntity( myChildEntity ) {
      switch ( true ) {
      case myChildEntity instanceof VcDatacenter:
      System.log( "Datacenter:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.hostFolder.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      for each ( var myChildEntitysChildEntity in myChildEntity.datastoreFolder.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      for each ( var myChildEntitysChildEntity in myChildEntity.networkFolder.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      for each ( var myChildEntitysChildEntity in myChildEntity.vmFolder.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcFolder:
      System.log( "Folder:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.childEntity ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcClusterComputeResource:
      System.log( "Cluster:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.resourcePool.resourcePool ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcResourcePool:
      System.log( "ResourcePool:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.resourcePool ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcVmwareDistributedVirtualSwitch:
      System.log( "DV Switch:" + myChildEntity.name );
      for each ( var myChildEntitysChildEntity in myChildEntity.portgroup ) {
      forEachChildEntity( myChildEntitysChildEntity );
      }
      break;
      case myChildEntity instanceof VcDistributedVirtualPortgroup:
      System.log( "Portgroup:" + myChildEntity.name );
      break;
      case myChildEntity instanceof VcStoragePod:
      System.log( "StoragePod:" + myChildEntity.name );
      break;
      case myChildEntity instanceof VcVirtualMachine:
      System.log( "VirtualMachine:" + myChildEntity.name );
      break;
      default:
      System.log( "Unknown:" + myChildEntity.name );
      break;
      }
    }
    

    Kind regards

    Chris

Maybe you are looking for