Email output of launchd job

I've setup a job using launchd which runs daily as the root user.  (I'm backup up my files to rsync.net and have followed the instructions at http://www.rsync.net/resources/howto/mac_rsync.html)
Firstly, how do I send an email of the output to an email address of my choosing?
Secondly, is it possible to be emailed if the job fails to run?
Regards,
Ian

Hi,
I tried what you told.Everyting is in place.
Any suggestions???
Thanks,
Saumia

Similar Messages

  • Email outcome of launchd jobs?

    I used to have a number of cron jobs set up in /var/cron/tabs/root. Since I have postfix turned on in my Mac, I would get emails sent to the local root email account detailing the outcome of these cron events.
    So, after "enhancing" my Mac's unix underpinnings to the point of inoperability, I found that an "archive and (re)install the OS" was in order. While I was at it, I decided to go ahead and convert all these cron jobs to launchd events (plist files in /Library/LaunchDaemons) since I was doing massive cleanup/recovery activities anyways.
    Now, as an example, one of my old cron jobs ran diskutil as root and verified the boot disk on a weekly basis. I "borrowed" one of Apple's OEM plist files and edited it. The replacement launchd plist file in /Library/LaunchDaemons looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>verifyBootDisk</string>
    <key>ServiceDescription</key>
    <string>verify boot disk as part of a weekly disk maintenance routine</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/sbin/diskutil</string>
    <string>verifyVolume</string>
    <string>/</string>
    </array>
    <key>StartCalendarInterval</key>
    <dict>
    <key>Hour</key>
    <integer>15</integer>
    <key>Minute</key>
    <integer>54</integer>
    <key>Weekday</key>
    <integer>5</integer>
    </dict>
    </dict>
    </plist>
    It appears to run okay, as do my other launchd jobs, because I can have Activity Monitor running and two processes, fsck_hfs and DiskManager, launch promptly at 3:54PM on Friday, so I believe that the launchd plist is doing exactly what I want it to do. But, unlike the old days when I was handling it as a cron job, I am no longer getting summary outcome emails sent to the local root email account.
    On the other hand, the /etc/periodic/* launchd jobs (where * is daily, weekly, or monthly) are generating these summary outcome emails and sending them to the local root email account.
    So, I'm wondering, does anyone know how to make launchd jobs, that are not being launched from within the /System/Library/LaunchDaemons/com.apple.periodic-*ly.plist environments, generate and send a summary outcome email to the local root email account?

    My own personal mailserver here is working just fine with authorized users sending and receiving mail to/from internal and external addresses (and I believe that it does NOT work for UNauthorized users, too .
    Currently, the periodic jobs are sending my root account summaries of results of the daily/weekly/monthly jobs. My issue is, for launchd jobs that are not handled within the "periodic" launchd environment (for example, my weekly "/usr/sbin/diskutil verifyVolume /" job that runs at a day/time way different than "periodic weekly" does), how might one get the launchd jobs to send notification emails of the outcomes of the various launchd jobs, like cron does? Because when these jobs were managed by cron, I got the notification emails. Now that launchd manages the jobs, I don't.
    The lines of interest in my main.cf are pretty close to what you have specified; I'm not convinced that these things would have any bearing on my issue so I would question (totally out of ignorance on my part) how/why lines 91 and 152, which I don't have, will enable launchd on the same computer as is hosting the mailserver to send itself an email. And it'd be my 'druthers to keep line 239 mynetworks_style=host≠subnet, as an overzealous and perhaps misguided antihack tool (I can use host because I make my mail clients tunnel into my mailserver via ssh using -L 2525:localhost:25 and -L 1430:localhost:143 port tunneling directives whether they are internal or external to my LAN, so their remote host is my localhost on my computer running the mailserver so mynetworks_style=host works just fine); plus, the mailserver computer is the same computer running the verifyBootDisk script so such an email notification would never leave localhost and get onto my LAN anyways; so I'd be interested in knowing why changing that to subnet would help. I'll try it maybe this weekend and see what happens, though, nevertheless. Got nuthin' to lose and everything to gain.
    Gary's post suggests that periodic and cron have the "notification email" function built into it and that launchd does not, hence, a "wrapper script" that launches the desired executable and pipes the standard output to Mail must be written. (I tried adding a Program Arguments string <string> | mail root</string> to my plist but that didn't do anything). I'll try Gary's suggestion of writing my own homegrown bash script, too, that my /Library/LaunchDaemons/verifyBootDisk.plist will reference (as opposed to it referencing /usr/sbin/diskutil as it does now), with, I envision (and hope), pretty much three lines in it:
    #! bin/bash
    /usr/sbin/diskutil verifyVolume / | mail root
    exit 0
    and I'll see what happens with that, too.

  • BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?

    Hi All.
    I have this request.
    BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?
    We have jobs scheduled on BODS running smoothly and absolutely fine.
    But to check, i am logging into the admin console and check for the jobs status.
    I would like to have an email to be received from BODS after each job is finished.
    It could succuessful. Or it could fail.
    Whatsoever, i wish to receive an email alert as soon as a job is finished.
    Can anyone advise me as to whether this could be made possible.
    And if yes, how this could be done.
    Thanks for your help in advance.
    In BOE CMC / for webi / schedule / we find an option to send email for a job success or a job failure.
    Is there any option similar to that in BODS ?
    Also would like to know :
    how to use the smtp_to or mail_to functions ?
    how to set up the smtp server for this ?
    thanks
    REgards
    indu
    Edited by: Indumathy Narayanan on May 31, 2011 3:47 PM

    Hi.
    Since am new to this BODS. I need some help.
    I already have many jobs which are running absolutely fine.
    And when a job runs, and finishes, am able to see the trace saying
    e.g. :
    Job_abc is completed successfully.
    We got the smtp service activated for our test server.
    and we hae a group email id.
    I have put the details of the smtp server / ip address / and said apply restarted.
    The i created a simple test script as below :
    print (' Before email ' );
    smtp_to('abc@company_name.com', 'Job ' || job_name() ||' on ' || host_name() || ' has FAILED',
    ' the job has failed', 0, 0);
    print('After Email ');
    It does send a email to as per smtp_to whatever email is specified.
    But how to differentiate between a job success
    And a job which has failed.
    I wish to have a mail which says on the subject :
    'Job ' || job_name() ||' on ' || host_name() || ' has completed successfully'
    ==> IF it is a success
    OR
    'Job ' || job_name() ||' on ' || host_name() || ' has failed'
    ==> if it has failed
    How to make the system identify, whether
    to send a success message or a error message whatever
    Could anyone advise.
    thanks
    indu

  • How to configure Email output in SD

    Dear friends Pls sent me details of how to configure email output in SD module.
    <REMOVED>
    Thanks & Regards,
    <REMOVED>

    Hi
    Idoc Def :Standard SAP format for electronic data interchange between systems (Intermediate Document). Different message types (such as delivery confirmations or purchase orders) normally represent different specific formats, the IDoc types. However, multiple message types with related content can be assigned to one IDoc type: For example, the IDoc type ORDERS01 transfers the "logical" message types ORDERS (purchase order) and ORDRSP (order confirmation).
    Idocs are of two types basic type and the extension type .we need to configure the system settings for this process .
    IDOC (Intermediate Document) - A data holder.
    IDOC is divided in to three parts.
    Control Record
    Data Record
    Status Record
    Control record (Table: EDIDC):
    - Every IDOC has only one Control Record
    - Each Control Record contains header information like:
    o IDOC Number
    o Direction of IDOC: Inbound or Outbound
    o Date and Time of creation of IDOC
    o Date and time when the IDOC was last modified.
    o Message Type of IDOC
    o IDOC type and extension of IDOC
    o Sender and Receiver Partner
    Data record – (Table: EDID4):
    - Data Record contains Data to be processed.
    - Every IDOC has one data record with multiple segments in hierarchy.
    - Segments and Hierarchy of Segments are defined by IDOC Type and Extension.
    - IDOC created has to strictly follow the hierarchy; else IDOC fails with Syntax error.
    - Segments which are repetitive have qualifiers attached to it
    Status record – (Table: EDIDS):
    - Status Record describes the status of IDOC.
    - Each IDOC contains one status Record with multiple status information.
    - Status at each level is appended to IDOC. E.g. When IDOC is created in SAP, Status is “This IDoc has been generated through a test transaction”, When the IDOC is added to system it is “IDOC added”, “IDOC ready to be transferred to Application”……
    - Status should always be read bottom-up. Status at the top is the latest status.
    - Some Example of Status Records:
    o Inbound:
    § 53 - IDOC successfully posted
    § 51 – IDOC Failed
    § 64 - IDOC ready to be transferred to Application
    o
    Outbound:
    § 30 – IDOC ready for Dispatch
    § 03 – IDOC passed to port OK
    § 12 – IDOC Dispatched
    § 16 – Functional Acknowledgement Positive
    § 17 – functional Acknowledgement Negative
    IDoc Type: Defines the segments and hierarchy of segments
    o Transaction Code:
    § WE30 – To create, change or display the IDOC type and the extension.
    § WE31 – To create the Segment
    - IDOC type defines the segments to be used in the IDOC.
    - It also defines the hierarchy and syntax of the segments.
    - IDOC extension is nothing but to add segments to standard IDOC types.
    - Transaction WE31 allows you to create segments.
    - Program RSEIDOC3 documents the use of each IDOC type.
    Segments:
    Attributes of a Segment:
    - Mandatory Segment: If checked, this segment should always exist in the IDOC.
    - Minimum Number:
    - Maximum Number: Maximum number of times this segment can be repeated in IDOC. -
    Parent Segment: Parent of this segment
    - Hierarchy level: Level of hierarchy.
    Segment Definition (WE31):
    Messsage Type: Defines the type of data in the IDOC
    o Transaction Code:
    § WE81 – To create, change or display the Message type and the extension.
    § WE82 – Using this transaction you can link Message Type, IDOC Type, IDOC Extension and version.
    - Message type identifies the type of data IDOC holds. E.g. Orders (ORDERS), Delivery (DESADV), Invoice (INVOICE). It also defines what needs to be done with the data in the IDOC, in case of Inbound IDOC, and which data to be extracted in case of Outbound IDOC.
    - Message Type is linked to a process code, which in turn is linked to a Function Module. This function module extracts from or posts data to SAP depending on direction of IDOC.
    - Relation between Message Type, IDOC type and IDOC extension needs to define. Without this relation Message type or IDOC type cannot be used.
    Message Type Create, Change or Display (WE81):
    Setup link between Message Type, IDOC Type, IDOC Extension and Version (WE82)
    Process Code: Function Module is linked to a process code. This function module in executed for inbound or outbound IDOC.
    o Transaction Codes:
    § WE41 – Outbound Process Code
    § WE42 – Inbound Process Code
    - Process codes are linked to a Function Module.
    - Relationship is Message Type is linked to a Process Code which is linked to a Function Module.
    - In case if you are using a stand alone code to trigger an IDOC, you need not define a process code.
    RFC Destination: System definition of destination.
    o Transaction Code: SM59
    - RFC destination identifies the destination of IDOC.
    - In case of ALE:
    o In ALE the communication mode is IDOC to IDOC, hence the type used is R/3 Connections.
    o It is the destination SAP system which will receive the IDOC.
    o In RFC destination you define the destination SAP system details like System, Login and Password.
    Go thr below links:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    Sail

  • Repeat email output for purchase order

    Hi all,
        I have an email output (ZMAL)) that sends a notification from purchase order when the total value exceed $50,000 at creation of PO.  This works fine.  However, during ME22N, when the total po value goes from  intial $30,000 to $60,000, at saving, it should email out a notification but it does not as initial output ZMAL was created at po creation.
    Q:  How can i get the notification to send out automatically the second time or third time when the condition exceeding $50,000 
         is   met ?
    If i create another output ZMAL manually in PO, then i can resend ZMAIL. 
    The condition checking is made in   'EXIT_SAPMM06E_012 in Include ZXM06U43.
    Pls provide any suggestions you have.
    thanks
    Joyce

    Hi,
    Does the output type get triggered for the first time automatically?  Instead of writing the condition in enhancement, it is recommended to write the output type determining conditions in Output type Requirement routine.
    NACE -> Select application -> Click on Procedures -> select procedure -> Click on Control -> Insert record for the output type -> Create routine and assign .
    Check standard output procedure of Purchase order "RMBEF1" to get an idea.
    Regards
    Vinod

  • Using email output mode with af:table

    Hi everyone,
    I am currently experiencing an issue with the email output mode. We have a page with an af:table that allows email output mode. When in thise mode, the table only shows 1-15 results.
    How can we allow the table to show all it's content?
    Thank you.

    The number of table rows displayed in "email" mode is determined by the af:table's "rows" attribute. By default this attribute is bound to the data iterator's range size. You can modify the "rows" attribute in order to return an arbitrary large number when the page is displayed in "email" mode, thus instructing the table to render all the rows, for example:
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
              rows="#{adfFacesContext.outputMode=='email' ? 1000000 : bindings.DepartmentsView1.rangeSize}"
              ...Dimitar

  • Hyperlink in the bursted email output

    Hi All,
    My requirement is to burst a report and email the output. But in the email output, i want to provide users the a link ( or it could be any other word) which says "Please click on this _link_ to see the output" and that link should take users to diff URL depending upon the region ...so for example ....
    for EMEA users who would get the mails, when the users will click on this link ...it should take them to let say www.google.com
    and for APJ users who would get the mails, when the users will click on this link ...it should take them to let say www.oracle.com
    i am open to include a column in the database which will contain www.google.com / oracle.com ( not sure if that's required) Or create a new table if required in the DB
    Is it possible to acheieve in BIP ? Please let me know.
    Thanks,
    Ronny

    Hi Kavipriya,
    Thanks for the reply, but I when i put this complete code in a single formfield , it doesn't fit in ...i mean the code is lengthy and when i put this in the form field text box, it automatically truncates it ? how to resolve this ?
    <?xdoxslt:set_variable($_XDOCTX,'link','www.google.com')?>
    <?if:REGION='APJ'?><?xdoxslt:set_variable($_XDOCTX,'link','www.oracle.com')?><?end if?>
    <fo:basic-link external-destination="url:{concat('http://',xdoxslt:get_variable($_XDOCTX,'link'))}" color="blue" text-decoration="underline">link</fo:basic-link>
    Thx,
    Ronny

  • New Email output type:  How to make invoice 'Copy' rather than 'Original'?

    Hello SD Friends-
    FICO guy here.  I created an output type to email invoices to customers however how do I change the invoice from saying 'Original' to 'Copy' when using this output type?
    Thank you!!

    Actual logic should be first copy s Orginal and next copies as Copy or Duplicate, if you want the output alsways as copy, then ask your abaper to write logic that what ever output processing status, email output should send as Copy.
    Please let me know if any questions.
    Regards
    Ramki

  • F110 Program RFFOGB_T - Can we achieve both Printed and Email Outputs??

    HI Experts,
    SAP Provides standard Program RFFOGB_T  for processing automatic bank direct debits and bank collections in domestic payment transactions for Great Britain and Ireland. This program is run as part of F110 Payment run. The standard program prints  the Payment advice notes.  We have used the Business Transaction Event 00002040 as per the documentation of the Program, to generate EMAILS instead of Printed Advice notes.
    With the changes made, we have met our requirements. However, now the Client desires to have both Email and Printed Advice Notes, If any of you have worked on this BTE, could you please suggest whether this is possible.
    My Understanding is, it could be either print or email as the input parameter to this BTE, finaa-nacha carries a value '1' which is for Printed output, the custom code in the BTE changes the value to 'I' for Email Output. How can we possibly achieve both.
    I am a developer, so pardon me if the description of the problem sounded too technical.
    Any suggestion would be highly appreciated.
    Thanks and Regards,
    Subhrangsu

    Hi,
    We found the same requirement but for F.27, which doesn't have any posting action. As pointed out by you, I think there can only be one output, either going to spool or mail and can't both. So in our case, we make two correspondence with each for spool and another one for mail. I think you might want to ask for SAP notes on your requirement.
    Regards,
    Teddy Kurniawan

  • EMAIL output type problem

    I am having problem in executing email output in order.In customer master email address is mentioned correct.But from order when I am executing the email output its going to some the customer email address not the one which is mentioned in the customer master.Can anybody tell me why it is happening??

    Dear Chakri,
                   As per my thinking this the cause for your problem so please check regarding that,
    Go to VA02 transaction there you enter your Sales order no which is in the problem ,then click on sales document (at top of the left corner) --> Issue output to , system will take you to output popup screen there you click on print options it will take you to details of the issue output, there you check who is Recipient of that output at Recipient field and medium of the output.
    If recipient is different change the recipeint to whom you wan to send the mail.
    I hope it will help you
    Thanks,
    Murali.

  • Difference of output from cron job & shell prompt

    We have a script in production like:
    sqlplus -s <username>/<password><<EOF
    set head off
    set feedback off
    set numwidth 4
    set serveroutput off
    spool /tmp/test1.txt
    prompt column1 , column2
    select column1||' , '|| column2 from <table> where <condition>;
    spool off;
    EOF
    echo "Best Regards," >> /tmp/test1.txt
    echo "IT Team" >> /tmp/test1.txt
    When run one time from the shell prompt, it gives the correct value like-
    column1, column2
    <column-1>, <column-2>
    Best Regards
    IT Team
    But when I run it from a cron job twice the output is like-
    column1, column2
    <column-1>, <column-2>
    Best Regards
    IT Team
    Best Regards
    IT Team
    The problem in the above output is that the bottom 2 statements,
    Best Regards
    IT Team
    keep getting repeated the number of times when the cron job is run. If the cron job is run 3 times the set of 2 statements get repeated thrice.
    I hope, I have been able to explain the problem.
    Requesting a reply to my query.
    Regards

    Locking this duplicate post - Difference of output from cron job & shell prompt

  • Email Output on any changes done in sale documents

    Hi all,
    Give me a suggestion. Is there any output type to trigger an email output to a sales partner (sales employee) when a sale document is changed.
    Regards,
    Mahibhan

    Hello Mahiban,
    Goto NACE transaction> Select V1 for sales> Select output type--> Go to description (let, BA00). Goto general tab and activate check for multiple issuing.
    If you add an order item to a sales order for which the order confirmation was already sent, you will want to send a changed output to the same customer this will trigger the same.
    Hope it helps.
    Reward points if helpful.
    Regards,
    Priyanka

  • I had to change my user ID because I used my email at my old job and now the old one keeps popping up and I can't sync mu phone or authorize my computer at work to sync my phone. to syn

    I had to change my user ID because I used my email at my old job and now the old one keeps popping up and I can't sync my phone or authorize my computer at work to sync my phone. I have a new user ID and PW that allows me into ITUNES but that old one won't go away. Any help? Thanks

    Hi, you can't change which ID was used to purchase any app. However, you can edit your Apple ID, which may be a better option than using a new id.

  • PO Email output sender address

    Hi guys,
    We are facing an issue with SRM PO Email output.
    The sender address of the Email is showing as Workflow system instead of the Username who has created the PO.
    Any suggestions?
    Thanks,
    naga.

    Hi naga,
    I think you can do this this way :
    Your PO is sent by mail so there is certainly a method called like : PROCESS_BBP_PO_MAI where your smartform is called. At the end of this method there is a function module called to send the mail : CALL FUNCTION 'SO_DOCUMENT_SEND_API1' this function contains parameter "sender_address". You should change this parameter by the mail of po requester. To find the mail of po requester you have to call : BBP_PD_PO_GETDETAIL and then find the requesters mail. Anyway try first with hardcoded mail to test it. You would also need to copy the standard class which is triggering this method in order to modify the code.
    Tell me if this answers your question and reward points if helpfull.
    Best regards,
    Laurent

  • Problem with PO email output type

    hi guys,
    we have done the setting for PO email output type DEML with transmission medium 5 External Send, program SAPFM06P  form MEDRUCK.
    we have done setting at MN04 as well, but when we preview at PO, no form display is coming out , and if i cancel the output, it got error Element TOTAL_NET_VALUE window MAIN is not defined for form MEDRUCK
    pls advice

    Hi Anya,
    The setting is suggested by oss note 191470 , medruck is standard form, why i need to change this form if it is as per note 191470 suggested .. then i changed to our customised program and form, another error message occurs Text  ID F13 language EN not found , how come all these weird msgs are coming out.. pls advice

Maybe you are looking for

  • Windows 7 - Event Log Subscription

    I have setup a windows 7 system to be the event log subscription collector. I have all my servers sending the application, security and system logs to the collector and all is working OK. How can I set this up so it can collect DHCP, DNS, DFS, Active

  • Support Desk Message is Sent to SAP; But the status is not updated

    Hi All, We have Solution Manager 7.0 SP15 with Windows Server and Oracle. Service Desk is configured. One user has reported a problem from satellite system. It arrived to Service Desk of Solution Manager. The support team message processor changed th

  • Russian and Chinese Flash movies - general advice needed please

    Hi all - This is a plea for some general 'jumping off' advice. I am an experienced Flash developer but now have a request to convert an existing xml-fed movie into both Russian and Chinese. I speak neither of these languages so we have had the conten

  • Extreme (N) No signal under 2.4ghz (N,B,G) Good signal under 5ghz (N,A)

    Well Ive been having issues with the wireless dropping out for about a month now. Now tonight everything under the 2.4ghz bands is dead. However I switched it to the 5ghz scale and it works fine. Does the airport extreme N have 2 radios? One for the

  • Sending all e-mails out of the draft-folder

    Is it possible so send all e-mails in the draftfolders at once? I know is possible with an AVB but do I have to use it also for outlook 2010. thank u