Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Timed Scripts

Timed Scripts
Thread Tools
Mac Enthusiast
Join Date: Oct 2000
Location: Toronto
Status: Offline
Reply With Quote
Nov 27, 2000, 08:05 AM
 
Hello, I need help creating a script, which will execute some other scripts at particular times of the day. For example, if I had 3 scripts, named A, B and C. I want to write a script which would allow:

Script A to be run at 10am
Script B to be run at 11am
Script C to be run at 12pm.

I also have another problem. These scripts are all running the same application, and it requires that I terminate the previous process, and restart it. How can I terminate a process in a script? I won't know the PID, because it could be any new number, and I want this to be automated. I hope somebody can help (and understands what I'm trying to do).

Thanks a bunch.............anothermacguy
     
Forum Regular
Join Date: Nov 2000
Status: Offline
Reply With Quote
Nov 27, 2000, 03:29 PM
 
i'm not sure but try "man cron" this should bring up the manual on cron which lets you schedule scripts
     
Mac Enthusiast
Join Date: Oct 2000
Location: Toronto
Status: Offline
Reply With Quote
Nov 27, 2000, 07:06 PM
 
Thanks iLoveOSX. That was exactly what I was looking for. In case anyone was curious, here is the answer to my second question (how to kill a process when you don't know its pid [when writing a script], but you do know the name it runs under):

ps -aux | grep NAMEHERE | grep -v grep | awk '{print $2}' | xargs kill

thanks again.........anothermacguy

[This message has been edited by anothermacguy (edited 11-27-2000).]
     
   
Thread Tools
Forum Links
Forum 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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:19 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2