Possible to trigger a systemd .timer on shutdown
I have been googling but not finding the answer to this question: what is the syntax for a systemd timer to have it trigger on a system shutdown?
Ok ... so I found out how to do this with EXS24 and not Ultrabeat.
The issue is now ... when I release the note, the HiHat sample only plays for about a millisecond. It doesn't play the whole sound/sample. I do have 1Shot enabled so it should play the full sound when released.
The sample will play fine when triggered with a DOWN STROKE but when released, it only plays a blip of the sample.
Anyone know what I'm doing wrong?
Similar Messages
-
Is i possible to trigger a workflow from the creation of an event in iCal
Is i possible to trigger a workflow from the creation of an event in iCal
Or is is possible to create a workflow to ad events to an iCal calendar which then triggers the workflow or is combined with the ad events workflow.
GraemeHmm, nope. Not that I'm aware of. Very few apps allow you to hook scripts directly to user activity. Finder* is a notable exception. iCal's "publish" feature has the ability to auto-update after user activity, but you'll either need dot mac accounts or your own webdav server to get that working.
I'd re-consider the idea of triggering a periodic workflow with iCal. That way if the computer is shut down or asleep, iCal will wait to run the workflow at its next opportunity. You could hide the unsightly repeating events in a second calendar so they're out of the way.
The next best thing is to write a faceless AppleScript application with a long-duration idle handler. The user would simply add it to their login items in System Preferences. This would also resume its cycle after sleep or shutdown.
Yet another option is to write an AppleScript that can register itself in the crontab. This has the advantage of running at a predictable time. If you're careful, you can even set the script to wake up or power on the computer as necessary.
* Folder action scripts can be triggered when files are created, moved, or deleted, but not when they're merely updated. This probably rules out much of iCal's activities in ~/library/application support/ical/. -
MacBook Pro takes much time for Shutdown (More than 1 min.)
I have a MacBook Pro, and some weeks ago, it takes much time for shutdown.
I've tried to install the 10.5.2 update, but nothing solves.
My mac takes for shutdown 1 min & 30 seconds every time. I don't understand. Why?
What can I do? I tried to repair permissions and reset the PMU, but the problem still there.
Help me! Please!
Thanks
Sorry, but I'm spanish and it's possible that I've made more mistakes writing in English.Thanks. I tried to dissable an EyeTv option, then EyeConnect don't appears in the Activity Monitor. This is the result:
Now, my MacBook Pro takes only 35 seconds for shutdown. I think is better than yesterdey, but is more than the 5 seconds that you described in the last post. Is 35 seconds a good time? In this 35 seconds, I only can see the background image, without icons and without the finder menu bar. After 35 seconds, Mac is off.
How can I disable iDisk sync? I have a free mac Account, but is expired and then I can't use iDisk, only the name in iChat. But, is iDisk enabled? -
Is it possible to trigger the acquisition and recording of data in this condition?
Hi
I am a LabVIEW newbie,
Is it possible to trigger the data acquisition and recording in the following case;
I have two input signals 1. Pressure Transducer 2. Pulse from a magnetic pickup.
I have to plot the pressure data against the pulses. Can I make the magnetic pickup signal as master signal to trigger the data acquisition and recording? and at the same time acquiring the pressure data as well.
How can I do that ?
Thanks.Hi Rich
Thanks...
I have PCI - 6033E High resolution multifunction I/O board and NI BNC - 2090 adapter chasis.
What I am getting is the pressure from the transducer and magnetic pulses.
Two cosecutive pulses encompass one complete cycle of the combustion process inside the engine.
I need to record the data for presenting the information offline.
Since combustion is a highly unstable process I need to get the optimum representative grapgh at a particular engine speed.
So lets say, I want the magnetic pulse to trigger this the data acquisition for 50 of such pulses, i.e. 50 complete cycles of diesel engine. So that these 50 acquired cycles may be averaged for pressure readings and a single representative curve (graph) may be produced.
Thanks again
Message Edited by SeaMist on 06-26-2008 02:49 AM -
Is it possible to trigger a JSP ?
Hello All,
Thank you for your answers on all my previous posts,
This time, I was just wondering if it is possible to trigger a JSP to run at a given time of a day ?.
Scenario :
I have done a JSP coding to automatically write an XML file from the database. I use this XML for the RSS feed in my project. If I could automate the creation of XML at a given time of the day, then my RSS feed system will completely be automated.
Thank you for your thoughts and suggestions in advance.The best way is if you have a Unix flavoured box and can benefit from the cron as the previous posts said. Then use the curl command to essentially ping a website.
I have also used lynx in the past which is gives you the ability to use on windows as well as add session/cookie and better result logging capabilities if necessary.
Hope that helps! -
[Solved] Launching multiple instances of a service from systemd timer
I have a short script that I want to run every 5 seconds. I've set up a systemd timer, which runs the script every 5 seconds, assuming the script terminates before the next elapse of the timer. However, if the script is still running when the timer elapses, systemd sees that the service is already active, so it does not run my script again.
How can I make my script run in another instance, every 5 seconds, even in cases where the script is still running from an earlier elapse of the timer?
I'd like to keep everything managed by systemd, in that it should capture stdout into the journal. I've looked at using a systemd socket unit with ListenStream pointing to a file system socket, where the socket-activated service template runs my script. Then, a timer unit runs a script that calls socat to send a single character to the file system socket to spin up an instance. The nice thing about this approach is that systemd can manage limiting the number of socket activations that can be spun up. However, I haven't gotten this idea to work yet.
Here's my test script, which I can cause to run for a long time by creating a lockfile.
[root@dogbert system]# cat /var/lib/misc/test1.py
#!/usr/bin/python2
import os
import time
import sys
print "%d starting..." % os.getpid()
sys.stdout.flush()
while os.path.exists("/tmp/test1.lockfile"):
print "%d sleeping..." % os.getpid()
sys.stdout.flush()
time.sleep(1.0)
print "%d exiting..." % os.getpid()
Here are my unit files:
[root@dogbert system]# cat /etc/systemd/system/test1.timer
[Timer]
OnBootSec=1min
OnCalendar=*:*:0/5
AccuracySec=50ms
[Install]
WantedBy=timers.target
[root@dogbert system]# cat /etc/systemd/system/test1.service
[Service]
Type=oneshot
ExecStart=/var/lib/misc/test1.py
Here's what happens if I create the lock file and then remove it. The script does not run at 10:39:30, but I get one "catch-up" run of the script at 10:39:32.
May 02 10:39:20 dogbert test1.py[10209]: 10209 starting...
May 02 10:39:20 dogbert test1.py[10209]: 10209 exiting...
May 02 10:39:25 dogbert test1.py[10228]: 10228 starting...
May 02 10:39:25 dogbert test1.py[10228]: 10228 sleeping...
May 02 10:39:26 dogbert test1.py[10228]: 10228 sleeping...
May 02 10:39:27 dogbert test1.py[10228]: 10228 sleeping...
May 02 10:39:28 dogbert test1.py[10228]: 10228 sleeping...
May 02 10:39:29 dogbert test1.py[10228]: 10228 sleeping...
May 02 10:39:30 dogbert test1.py[10228]: 10228 sleeping...
May 02 10:39:31 dogbert test1.py[10228]: 10228 sleeping...
May 02 10:39:32 dogbert test1.py[10228]: 10228 exiting...
May 02 10:39:32 dogbert test1.py[10250]: 10250 starting...
May 02 10:39:32 dogbert test1.py[10250]: 10250 exiting...
May 02 10:39:35 dogbert test1.py[10269]: 10269 starting...
May 02 10:39:35 dogbert test1.py[10269]: 10269 exiting...
May 02 10:39:40 dogbert test1.py[10287]: 10287 starting...
May 02 10:39:40 dogbert test1.py[10287]: 10287 exiting...
Last edited by johnp636 (2015-05-05 01:22:35)johnp636 wrote:However, if the script is still running when the timer elapses, systemd sees that the service is already active, so it does not run my script again.
That's normal, you cannot start again an already active service unit, which is what the timer tries to do if the next trigger comes before the service ends.
How can I make my script run in another instance, every 5 seconds, even in cases where the script is still running from an earlier elapse of the timer?
I don't think that a timer can do this with a simple service.
But a shell script can manage this.
I'd like to keep everything managed by systemd, in that it should capture stdout into the journal.
The command 'systemd-cat' can be used in the shell script to get this feature.
I propose this bash script:
#!/bin/bash
nbprocess=0
while true; do
if ((nbprocess <= 2)); then
systemd-cat /var/lib/misc/test1.py &
fi
nbprocess=$(pgrep test1.py|wc -l)
sleep 5
done
It limits the number of test1.py processes to 3.
This script can be started with a service unit, without using a timer:
[Service]
ExecStart=/var/lib/misc/test1.sh
Stopping this service, will end all the running test1.py processes.
Maybe there is a better way to do this, but this method is simple; if I find something else, I will post again. -
What is the minimum trigger hold off time for the 5124
What is the minimum trigger hold off time for the 5124 i.e. what is the fastest i can collect data without streaming?
Mark Mutton
Electrical EngineerGood morning Mark,
Thanks for contacting National Instruments with your issue, we'll try our best to resolve it for you as quickly and efficiently as possible.
The minimum trigger hold-off time for the NI PXI/PCI-5124 is 2 us with TDC disabled and 10 us with TDC enabled.
You can take a look at any other trigger specifications for the NI PXI/PCI-5124 below:
http://digital.ni.com/manuals.nsf/websearch/35D2892B4AC32E5A8625704A00590CFD
Best of luck with your project.
Sincerely,
Minh Tran
Applications Engineering
National Instruments -
Is it possible to delete files from time machine?
Is it possible to delete files from time machine? I had a drive crash, restored the files to a new drive, and now the old versions and the new versions of the files are both backed up, taking up a mountain of drive space. Do I just have to wait 'til the drive gets full and then tell it what to delete first?
Hi, I need help in a related problem. I have 500gb time capsule. I needed larger hard drive, so I now use TM to back up to a different 1tb hard drive. So I don't need the TC as a TM back up device. But I want to use the TC's hard drive as an extra external hard drive. I deleted the files that were on it. but it still shows it has a sparsebundle file with a size of over 400gb ( probably the size of the old backups). When I use disk utility to try to erase it, I am not offered the erase tab. This "disk" does show on the desk top as a mounted disk (I think) with only 53 gb free. How can I set this up so all the disk space is free and I can use it for storing files, not as a back up? Thanks
-
I have a mid 2010 Macbook Pro running Snow Leopard and foolishly upgraded to Yosemite. Now have numerous problems. Is it possible to go back in time with Time Machine and reinstall Snow Leopard? Then upgrade to Lion or Mavericks? Any other ideas on how I can exit Yosemite?
Once you get yourself back to Snow Leopard, if you still want to upgrade somewhat, I would suggest the following:
1. Get an external hard drive that you can use for experiments with new OS versions. You could partition it into 2 or 3 partitions. You could then clone your existing Snow Leopard system to one partition using Carbon Copy Cloner (well worth $40) or SuperDuper ($25).
2. Buy OS X Mountain Lion for $20, through the Apple online store (I don't think it's available through the App Store). Apple has decided to make it very difficult for anyone to get Mavericks unless they have already downloaded it.
You will receive two e-mails from Apple, one containing a PDF with a redemption code, and one with the password you will need to unlock the PDF. Using the code, you will download Mountain Lion from the App Store, where it will appear among your Purchased items.
After ML finishes downloading, its installer app will launch itself. When you see this launch screen, QUIT the install app immediately! Go to your applications folder, find the Install OS X Mountain Lion app, and copy it to a safe location outside of your Applications folder. Keeping one or more copies will allow you to reinstall without unnecessary aggravation if you later need or want to do that. At this point, you can re-launch the Installer in the Applications folder and let it run. You can install it on a clean partition on your external HD, or you can allow it to upgrade the Snow Leopard clone you created on your external drive, or you can do both. This should allow you to test how everything works for as long as you like.
3. If you left yourself a free partition on your test drive, try a clean install of Yosemite and set everything up from scratch (do not migrate anything). This will allow you to see whether your problems with it were related to something in your Snow Leopard system. -
is it possible to stop the system time out on my imac? i have tried 5 times in the last 24 hrs.it will run for approx.3hrs,and then times out and i have to start
from the beggining againWhat is the url of the file your are downloading?
What web browser are you using?
What type of connection do you have to your isp? phone line, dsl, cable, fios...
Try iCab. It lets you restart a download.
icab.de
Robert -
Takes long time for shutdown after adding to domain
Hi,
Workstation OS - Window 7
Domain Controller OS - Window server 2008 R2 standard
Following thing i have measure with Stopwatch.
1) When the laptop is in workgroup, it takes just 17 second for shutdown.
2) when i added the same laptop in domain ( corp.abc.com ), now it takes 1minutes and 22 second for shutdown. ( it just show shutting down screen )
Why the shutdown time increased so much?
Do you have any idea?
Note:- i have not make any changes in laptop, nor added any software. I have done the above testing because user start complaining that after putting laptop in domain it takes long time for shutdown. It's happening to all laptop where the OS is window 7
There is no logoff scripts / gpo's as well as we don't have roaming profiles.
Please advice.
Thanks & Regards,
Param
www.paramgupta.blogspot.comHi,
To troubleshooting this issue, please install Windows Performance Tools (WPT) Kit. The Windows Performance Tools (WPT) Kit contains performance analysis tools, and is designed for analysis of a wide range of performance problems including application start
times, boot issues, deferred procedure calls and interrupt activity (DPCs and ISRs), system responsiveness issues, application resource usage, and interrupt storms.
To get the installer, you have to install the Windows 7 SDK.
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
http://www.microsoft.com/en-us/download/details.aspx?id=3138
For shutdown tracing:
Run command:
xbootmgr -trace shutdown -noPrepReboot -traceFlags BASE+CSWITCH+DRIVERS+POWER -resultPath C:\TEMP
Collect logs and post them for further troubleshooting.
For more information please refer to following MS articles:
Long Shutdown Time on Windows 7 Ultimate x64
http://social.technet.microsoft.com/Forums/en/w7itproperf/thread/11a42a93-efd2-4184-9ce8-bbc1438b7ea6
Long shutdown time on Windows 7 64 bit laptop
http://social.technet.microsoft.com/Forums/en-US/w7itproperf/thread/4440fc6e-c81e-440c-9183-9b7e176729d2
Lawrence
TechNet Community Support -
Is it possible to trigger an event when clicking context menu trigger icon?
When opening a context menu on a UI element, is it possible to trigger an event to handle, eg. set the lead selection for this context element to which the UI element is bound, when clicking the menu trigger icon ?
First, these NW04s menus are not really context menus. They are static menus that are rendered within the view layout. Real context menus will come later.
There is no "onMenuOpen" event for an application.
Armin -
Is it possible to trigger FIPP event (and how?) when parking an FI document
Hello
I wander is it possible to trigger FIPP event (and how?) when parking an FI document with transaction fbv1(and not fv60)
Thx in advanceHi,
In Financial Accounting --> Accounts Receivable and Accounts payable > Business Transaction> Incoming Invoices/Credit Memos --> Make and check settings for Document Parking --> Create Workflow Variant for Parking Documents (Click this)
There you have to assign your workflow.
Regards,
Surjith -
Is it possible to trigger action in backing bean on page unload event?
Hi,
There is a RichPopup in my page which has a Listener to save data or not by user choice "Data change detected, do you want to save those changes?"
I've tried with the javascript event 'window.onbeforeunload', but this way must be fit with a Servlet function which I am not allowed to use.
The attibute 'onunload' in the tag '<af:document>' seems useless. Even there is few description or example in the 'Tag Reference'.
So, is it possible to trigger action in backing bean on page unload event? Thanks in advance for helping.
VivaHi Frank
Thanks for helping, I've tried in your way. My codes are like below:
Page codes:
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" clientComponent="true" title="viva test">
<af:resource type="javascript">
if (!window.addEventListener) {
// alert('window.addEventListener is not supported in IE8. Override it!');
window.addEventListener = function (type, listener, useCapture) {
window.attachEvent('on' + type, function() {listener(event)});
window.addEventListener('beforeunload', function (){performUnloadEvent()}, false);
function performUnloadEvent() {
var eventSource = AdfPage.PAGE.findComponentByAbsoluteId('d1');
//var x and y are dummy variables obviously neeed to keep the page
//alive for as long it takes to send the custom event to the server
var x = AdfCustomEvent.queue(eventSource, 'handleOnUnload', {args:'noargs'}, false);
var y = 0;
</af:resource>
<af:serverListener type="handleOnUnload" method="#{vivaTestBean.testOnUnload}"/>
<!--
<af:form id="f1">
<af:commandButton text="Unload" id="cb1" action="unload"/>
</af:form>
-->
</af:document>
</f:view>
</jsp:root>The backing bean codes:
public class VivaTestBean {
public VivaTestBean() {
public void testOnUnload(ClientEvent clientEvent) {
System.out.println("Thanks God");
}The first way which triggers a 'unload' event by clicking a button DO WORKS. :)
But when I changed the triggered way by changing the <af:document> to clientComponent as what you did, the 'onbeforeunload' event won't come out when I refreshed or closed the page.
That doesn't make sence, since I think the two ways to trigger a 'unload' event are the same.
Edited by: 841766 on 2011-3-7 上午1:13 -
Is it possible to increase user exit time out for a partcular user
Dear Sir/madam,
Is it possible to increase the User Time Out for a Particular user ?
We do it through RZ10 and as per I know when it is changed, it is effected to all the users.
Pls advice.
Thanks,
PranabHi Pranab,
Not possible for a single user.
Regards
Ashok Dalai
Maybe you are looking for
-
App store cannot be opened because of a problem - failed upgraded to 10.8.2
I earlier tried upgrading, through Software Update... and the App Store to Mac OS 10.8.2. however upon restart and installation it said the update failed. What's happening now is if I click to start the Software Update... again, or try and open the A
-
I installed Yosemite yesterday. Now, when I paste an image into a new window to combine it with another image, the layer or layers automatically snap back to the center of the new window. How do I stop this from happening?
-
Adobe Acrobat - Create PDF Chrome Extension Doesn't Work
The extension was installed when I installed Acrobat Pro XI and worked fine until Chrome was updated to version 29 or 30. The extension is enabled, the drop down works, but it doesn't do anything when you click on the drop down choices.
-
Java.lang.NullPointerException.... please help.
I have been trying to figure out what is wrong with my code, but I have not had any luck. For this program, I used a package called PNGEncoder located here http://catcode.com/pngencoder/ There is a sample code that I tried to follow. My code is as fo
-
Fireworks CS4 Trial Will Not Install
I have just downloaded both the .exe and .7z file for the Fireworks CS4 trial. I downloaded the files using Firefox 3.5 on Windows XP. When I hit launch in Akamai, nothing happens. If I double click the .exe file in Windows Explorer, the command prop