Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

elchemor

macrumors member
Original poster
May 10, 2011
73
9
Abu Dhabi - UAE
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 ??
 

ytk

macrumors 6502
Jul 8, 2010
252
5
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.
 

elchemor

macrumors member
Original poster
May 10, 2011
73
9
Abu Dhabi - UAE
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.