Possible to run Automator job before shutdown (automatically)?

Subject says it all, really: I have an Autamator job that copies some files from one place to another.
I want to run this job automatically before the machine shuts down. Is this possible?

Yes. Just add it to the Automator workflow with the "Run AppleScript" action and save it as an application to put in your Dock, or the sidebar in a Finder window, or the toolbar in a Finder window.
If you don't want it to be too easy, then put it in a folder first. Then put the folder either in the Dock, or the sidebar or toolbar of the Finder window so you'll have to perform two clicks.
In the "Run AppleScript" action, you can delete everything in the text box since you don't need to process any items, and then add this:
tell application "System Events" to shut down
Note that "shut down" is two words. You can also use the words "restart", "sleep", or "log out". There will not be a confirmation dialog, excepting when applications ask to save unsaved documents (unless sleeping).
In the future, you can find this is out again with Script Editor somewhere in the Applications folder (or use Spotlight). You'll want to open the "System Events" scripting dictionary, and it's probably already in the "Library" window (check the Window menu, or Command-Shift-L). Use the search in the "System Events" dictionary window to find "shut down", or anything else.
Be careful about testing this script since it will immediately shutdown the computer without a confirmation dialog. Perhaps have an unsaved document opened while testing, such as another Automator workflow with any action added and unsaved, or a new TextEdit document with a some random text typed in (a single letter will do).

Similar Messages

  • Is it possible to run scheduled job

    Is it possible to run scheduled job (custom developed java application), for doing some periodic database operstions in portal.
    I'm using portal database (maxdb) with my portal application.I must do some periodic calculations and store them into database table.Therefore i must use scheduled job running on ortal server.
    Is it possible? If possible, how?
    Thanks.

    Hi,
    Yes it is possible with SAP NetWeaver Scheduler for Java.
    You can check below link for more information:
    http://help.sap.com/saphelp_nwce71/helpdata/en/44/03d66015ee10b3e10000000a11466f/content.htm
    http://help.sap.com/saphelp_nwce71/helpdata/en/45/45d287e620507be10000000a1553f6/content.htm
    Thanks
    Sunny

  • Will it be possible to run several jobs in background at the same time?

    Hi!
    The new release looks promising. Look forward to hear more in Birmingham.
    Just now we have a problem. It have to do with functionality In Toad compared to SQL Developer.
    Will it be possible to run several jobs in background at the same time. Toad allows that.
    If yes: How can we make that happen?

    "Jobs" are always background.
    But I take you mean queries. Yes, since v1.5.x you can open an Unshared SQL Worksheet (ctrl-shift-n or the toolbar button).
    Have fun,
    K.

  • Run a  script before shutdown with launchd

    Is there a way to run a shell script before shutdown with launchd? In 10.4, I have a shell script to remove user's folder when a user logs off.
    Lisa Perez

    the only way to do it that I know of is using a logout hook. see this link for details
    http://www.bombich.com/mactips/loginhooks.html
    However, I'm not sure exactly at what point in the logout process the logout hook is executed so there might be a problem running a script that deletes the home directory of the user that's being logged out.

  • Possible to run repair permissions before mac fully boots?

    Is it possible to use a keyboard shortcut during boot, type in some code, and run disk utiliy or repair permissions?
    Cause I would like to run it but the powerbook wont fully boot and my install disk is in a different city.
    Can I use anyones leopard install cd or does it need to be mine?
    plz help
    Message was edited by: wroth

    VK and Kenichi are right. Permissions have changed so don't run repair permissions from a non-Leopard disk.
    However, repairing permissions has really become a "magical elixir" that is supposed to solve all kinds of problems. It won't.
    Apple's official recommendation is not to run repair permissions from the install disk because a software update could have changed permissions. In any event, if your machine won't boot, repairing permissions won't help. Repairing the disk might.
    The HFS+ file system hasn't changed in Leopard. If your machine won't boot, and all you have is a Tiger disk, running disk repair should be safe. After all, it is perfectly safe to have both Leopard and Tiger on the same machine and Tiger can and will run disk repair on its own when it boots up.
    Hopefully I've salvaged something from my technical reputation.

  • Running ksh jobs directly on EXADATA compute node.

    My organization is in the process of considering the acquisition of an EXADATA applicance.
    We have a 100TB database (V11.2.0.1.0) running on a 48 processor AIX P770 box. We process approximately 2000 jobs / day (using CONTROL-M) against our PROD ORACLE instance. All of the jobs run via AIX ksh scripts directly on the database server that hosts our PROD database. We want to simply forklift our current database to EXADATA, and we want to be able to run our current job set unchanged. Can we move our AIX ksh scripts over to the EXADATA compute nodes, and simply execute the jobs directly under Linux on one of the compute nodes?
    We know that there are likely to be some syntactical differences between LINUX ksh and AIX ksh and are prepared to deal with that.
    NOTE: We do a lot of processing using external flat files (usually loaded as external tables), and we write out hundreds of flat files for export to other systems using UTL_FILE. Given that, we would like to do our job processing directly on the database server / compute node where the files would be loaded from / written to.
    Any thoughts are appreciated.

    Hi user6201670,
    The short answer to your question is yes: it is possible to run ksh jobs directly on a database server.  As for file storage, there is a limited amount of space on the OS disks, but for large data and I/O volumes consider mounting an external file system:  be it DBFS, an external NFS device, or (as of GI 12.1.0.2) ACFS.
    A few things to keep in mind:
    - For critical services, plan on how to offer high availability in case of a node failure
    - If data loads are a big part of your workload, think about how to load-balance between multiple database servers
    - File processing by script with UTL_FILE is considerably slower than direct-path inserts via something like SQL*Loader
    - When paying for Oracle licenses by processor, using database server CPU time to run dataload scripts can be quite expensive
    HTH,
    Marc

  • Is it possible to delete a running background job programatically?

    Hi Gurus,
    is it possible to delete a running background job programatically? if yes how can we do that?
    Thanks in advance

    Or as sais by Sandeep you can use that fm.
    Before calling that select the required data from table TBTCO and pass to the fm.

  • Suspend automation jobs from running on weekends?

    Every month, our W2K3 servers reboot over a weekend to activate security patches and updates released by microsoft. If any portal automation jobs are running when the server reboots, the next time they run, they fail because the operation is locked. We have many jobs that run every 10 or 15 minutes, so over the course of a weekend after a reboot, this causes many failures. We would like to suspend the jobs either nightly or just every weekend during off hours, but there is no way to do that via the job settings in Admin.
    I found some references to such things in the PT tag reference - PT_SCHEDULE_SUSPEND_WEEKEND_BEGIN_TIME and PT_SCHEDULE_SUSPEND_WEEKEND_END_TIME, but I have no idea where or how to use such code. Actually, I'm not 100% sure that code is for the automation service (what else would it be though?). Oracle being Oracle, there is no sample code on how to use it or even a description of what it's for.
    Any ideas on how to suspend automation jobs from running during certain hours on the weekends would be greatly appreciated. Thanks.

    user2604361 wrote:
    Any ideas on how to suspend automation jobs from running during certain hours on the weekends would be greatly appreciated. Thanks.I have zero idea if this is possible, but I'm wondering if it would be possible to create a .bat file that turns them all off on Friday night and reactivates them all on Monday morning. I've heard that the Automation service can run custom jobs to do such things although I've never attempted it.
    Sorry I can't be any help! Whatever solution you come to, please post back here as I'm interested in what you come up with!

  • Retrospect automated jobs dont run

    I have recently noticed that on one of my xserve (10.3.9 server) the automated Retrospect (6.0.204) jobs fail to automatically start at the scheduled time. I have a backup job to external FW 800 running at 12.01am and a backup job to tape at 04:00am. If I login to the server in the morning and run Retrospect application the "queued" jobs immediately start to kick in. Any ideas why this would happen?

    Try to leave the machine logged in when Retrospect is supposed to run. Since it is an application it should require the user be logged in.

  • Announcement/message before shutdown by using Automator?

    I wondered if it was possible to show a message or announcement when I try to shut down, like a message of some sorts that reminds me to set my Magic Mouse on off to save batteries and stuff like that. I'm not experienced enough with Applescript to know if it's possible by using Automator. If it is: how do I do it?

    This will only trigger if you run the Automator workflow to shut down the system. You can alternatively set up a logout hook to trigger such a message a logout. First create a small applescript that will issue the desired alerts and prompts an then shut down. Then create a small shell script that uses the "osascript" command to execute the applescript. You can also save the Automator workflow as an application and then target this application for execution directly from the shell script instead of using "osascript" (there are ultimately many ways to go about this).
    Then create the logout hook so it points to the shell script, by opening the Terminal and running the following command:
    sudo defaults write com.apple.loginwindow LogoutHook /path/to/script
    When experimenting with this, if you cannot get it to work then you can undo this hook setting by running the following command:
    sudo defaults delete com.apple.loginwindow LogoutHook

  • I want to run automation test in multiple device say iphone and ipad or two iphone device Is it possible.I have done automation testing using UIAutomation and get it running from iphone device

    I want to run automation test in multiple device say iphone and ipad or two iphone device Is it possible.I have done automation testing using UIAutomation and get it running from iphone device

    plzzz reply to this question as soon as possible

  • ** Is it possible to run a windows .bat script job from ODI between server?

    Hello Friends,
    We have ODI 10.1.3.5 on a Win2003 Server.
    Have a windows Batch script job .bat(this is a related to a different program - DRM) on a different Windows 2003 server...is it possible to execute .bat job thru ODI between servers?
    Appreciate your suggestions...
    Thanks.

    Hi AJ,
    Here are more details:
    Server-A: ODI Server (Win2003)
    Server-B: Oracle DRM Server (Win2003)
    Server-C: ODI scheduler agent is installed (Linux)
    We have a .bat batch script job on Server-B which we are planning to run from Server-A (as part of the ODI package execution flow)
    This .bat job exports the DRM hierarchy data to a table that ODI uses to process next steps.
    So, you are suggesting to install ODI agent on Server-B? If we do that...not sure if there be issues if we have to run the package with other scenario's (interfaces/Procedures) that refer agent isntalled in Server-C??
    Any feedbacks are appreciated!!
    Thanks

  • How to run a job automatically with file watcher

    Hi,
    I want to execute below job automatically when the file arrived in the oracle directory path..
    I am able to run the job manually.
    version details
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production"
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    BEGIN
        SYS.DBMS_SCHEDULER.CREATE_JOB (
                job_name => '"UPN_COMMON"."EMPJOBS"',
                job_type => 'STORED_PROCEDURE',
                job_action => '"UPN_COMMON"."INS_EMP"',
                number_of_arguments => 0,
                start_date => TO_TIMESTAMP_TZ('2013-09-30 09:22:20 America/New_York','YYYY-MM-DD HH24.MI.SS TZR'),
                event_condition => '(1=1)',
                queue_spec => '"UPN_COMMON"."FILE_WATCHER"',
                end_date => TO_TIMESTAMP_TZ('2013-09-30 10:52:20 America/New_York','YYYY-MM-DD HH24.MI.SS TZR'),
                job_class => '"SYS"."DEFAULT_JOB_CLASS"',
                enabled => FALSE,
                auto_drop => FALSE,
                comments => 'TESTING A PROCEDURE',
                credential_name => NULL,
                destination_name => NULL);
        SYS.DBMS_SCHEDULER.SET_ATTRIBUTE(
                 name => '"UPN_COMMON"."EMPJOBS"',
                 attribute => 'logging_level', value => DBMS_SCHEDULER.LOGGING_OFF);
        SYS.DBMS_SCHEDULER.SET_ATTRIBUTE(
                 name => '"UPN_COMMON"."EMPJOBS"',
                 attribute => 'max_run_duration', value => INTERVAL '1' MINUTE);
        SYS.DBMS_SCHEDULER.SET_ATTRIBUTE(
                 name => '"UPN_COMMON"."EMPJOBS"',
                 attribute => 'schedule_limit', value => INTERVAL '1' MINUTE);  
        SYS.DBMS_SCHEDULER.enable(
                 name => '"UPN_COMMON"."EMPJOBS"');
    END;

    >I want to execute below job automatically when the file arrived in the oracle directory path..
    the code which results in the file arriving in the Oracle directory path needs to be enhanced to invoke the desired PL/SLQ procedure.
    file arrival is OS operation that Oracle knows nothing about &  is totally & completely oblivious to this event

  • Possible to run NXT program on PC simulate before I run it on nxt brick?

    1. Is it possible to run NXT program on PC simulate before I run it on nxt brick?  For example, NI has this program http://legoengineering.com/library/doc_download/126-play-the-scale.html so I want to run it on my PC first to check it and or modify it.  Then later I will install(compile) whatever to put it on the nxt brick.  Is there any type of simulation program or visual simulation of what I am about to put on the nxt brick before I put it on? 
    2.  (a)What is the difference between Lego NXT-G 2.0 versus (b)(Labview Student edition $80.00 + NI LabVIEW Toolkit for LEGO MINDSTORMS NXT )? I am guessing no datalogging with just option b?
      (a= http://www.legoeducation.com/store/detail.aspx?CategoryID=178&by=9&ID=1670&c=1&t=0&l=0&bhcp=1 ) (b= http://zone.ni.com/devzone/cda/tut/p/id/4435 )
    Thank you?.

    I do know of this one software where you can simulate the NXT, but it might only be for NXT-G programs.
    SimplySim at The NXT Step
    Other than that I don't think there's any way.
    As for the difference between the two, there's a whole ton. Those are two different programs with very different syntaxes. Lego NXT-G is the basic software that comes with the NXT kit. It's a very scaled down version of LabVIEW and is pretty nice. LabVIEW is much more advanced and you can do much more with it, but you are restricted to using the LabVIEW NXT Toolkit and the NXT's cababilities. (no float, only so much RAM, etc.). But you can still do a ton more with it. Yes, you can data log with LabVIEW in, like, many ways.
    Hope that helps!

  • It is possible to run a timer job in Office 365 online?

    Hi All,
    Is it possible to run a timer job on 1st of every month  for a list in office 365? I have a requirement that I need to send data of current month via email on 1st of every month. should I use timer job in Office 365?
    Thanks in Advance.

    Hi Darsh,
    There is no option available to run a timer job in SharePoint Online (Office 365), SharePoint timer job option is available only in SharePoint On-premise.
    Microsoft Office 365 provide an alternate of the SharePoint timer Job "Web Jobs" on Azure. You can create Web Job by 2 types
    Web Job as a App on SharePoint
    Web Job as a scheduler
    Read the below articles 
    http://blogs.msdn.com/b/kaevans/archive/2014/03/02/building-a-sharepoint-app-as-a-timer-job.aspx
    http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2014/04/07/sharepoint-timer-jobs-running-as-windows-azure-web-jobs.aspx
    Vivek Jagga 
    My Blog

Maybe you are looking for

  • Vista bootmgr compressed VISTA - need command prompt!

    I am at wit's end and even though my 8 year old bought his HP G60 with his own money, I am about to hurl it out the window as I wasn't "consulted" and would not have condoned this unfamiliar to me Vista O/S. All I wanted to do was reset the computer/

  • Sending Production Plan to Vendor / Supplier

    Dear Sir Ours is a production unit (assembly line) we use lot of components. So I want to know is it possible to send plan directly to Vendor by E-mail from SAP. Thanks & Regards Vishal

  • File upload with DAD not working

    Hi all, I have an application which uses the file upload function, similar to the sample http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html During the development I was not using a DAD and it was working perfectly. Now I hav

  • Regd:Export And Import

    Hi, Can i get the steps and syntax of expdp and impdp. Or else any links . I could find only forums Regards, Simma......

  • Email notification to user on Reciept of Material..

    Hi Experts , Is it Possible  to intimate end users / through Email on Recieving the Material.. Please do let me know..how? Thanks in Advance Adarsh