Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 2, 2013, 03:21 PM   #1
elchemor
macrumors member
 
Join Date: May 2011
atrun precision

Hey everyone,

before i start, i know many will jump saying get an RTOS, but am not able to find any that works on Mac (parallels, or native)

what am trying to do, is run some at jobs to schedule scripts to run, i need seconds precision to run them to avoid them running simultaneously, aka : 22:10:02 - 22:10:25 - 22:10:42

with the command at -t CCYYmmddhhmm.SS the .SS (second) is always ignored by OS X (mountain lion here) no matter what i provide, it always launch at the .00 mark or simultaneous for that matter, sometimes it delays like 20 seconds to send.

now, i can do a shell script with a sleep in between the commands i wish to launch, but not being able to know how long exactly each one would take *it could vary in few seconds), i may end up with the command number 400 being several minutes after desired time. (last time i tried i was 20 minutes late)

is there any known way, for making the ATRUN seconds aware (real-time) ? or that's a dead case ??
elchemor is offline   0 Reply With Quote
Old Jan 2, 2013, 05:24 PM   #2
ytk
macrumors regular
 
Join Date: Jul 2010
I don't understand why the shell script option won't work for you. Just set it up to fire off the commands in the background (add an & to the end of each line), then sleep for the required time between commands. That way you can know exactly when each command in the sequence starts. You just won't know when each command ends, so some commands might end up running concurrently, but it sounds like that's the intended behavior in this case.
ytk is offline   0 Reply With Quote
Old Jan 2, 2013, 10:49 PM   #3
elchemor
Thread Starter
macrumors member
 
Join Date: May 2011
yeah, that's something that didnt cross my mind, having them run in the background (and sleep the time from start to start) instead from finish to start.

will see how will that go.
elchemor is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:52 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC