Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 28, 2013, 01:47 PM   #1
iAintKnowMac
macrumors newbie
 
Join Date: Jun 2013
Need help: Perl scripting

i have created a perl script that does some stuff. (what it does is not important.) what i need to do is have the script run and reboot at the end and when the mac reboots, the script runs again. i need to make it so it will run and reboot for several days. How would i accomplish this?
iAintKnowMac is offline   0 Reply With Quote
Old Jun 28, 2013, 02:00 PM   #2
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: Belgium
Info : launchd
launchd.plist
http://nathangrigg.net/2012/07/sched...using-launchd/
__________________
Space Corps Directive 34124
kryten2 is offline   0 Reply With Quote
Old Jul 1, 2013, 05:26 PM   #3
iAintKnowMac
Thread Starter
macrumors newbie
 
Join Date: Jun 2013
I choose to use the cron method. I have made a crontab for a simple script, but when i try to use my actually script it does not open. I am running my script when the computer reboots, my script is saved on a flash drive. Can the Mac not run a script off of a flash drive at boot time?
iAintKnowMac is offline   0 Reply With Quote
Old Jul 1, 2013, 06:02 PM   #4
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by iAintKnowMac View Post
I choose to use the cron method. I have made a crontab for a simple script, but when i try to use my actually script it does not open. I am running my script when the computer reboots, my script is saved on a flash drive. Can the Mac not run a script off of a flash drive at boot time?
Does the flash drive mount? When, exactly?

Break the problem down into smaller steps you can confirm. The most obvious initial breakdown is "Does the flash drive mount?" followed by "Does a script on the flash drive run?". Without the first, the second is moot.

If the flash drive isn't mounting, then you'll need to postpone whatever you're doing that needs it to be mounted.
chown33 is offline   0 Reply With Quote
Old Jul 2, 2013, 11:55 AM   #5
iAintKnowMac
Thread Starter
macrumors newbie
 
Join Date: Jun 2013
Instead of using the flash drive i just put files on the main drive. I finds the script just fine. Now the problem I'm having is when the cron tab run at boot time my script will run; it will mount as its supposed to, do what it needs to do, then it fails at unmounting. When i run the script in the terminal it works just fine.
iAintKnowMac is offline   0 Reply With Quote
Old Jul 2, 2013, 10:28 PM   #6
chown33
macrumors 603
 
Join Date: Aug 2009
Post more details:
http://www.mikeash.com/getting_answers.html

Error messages? Post them.

Failing commands? Post them.

What's being unmounted? Your 1st post said reboot; why unmount anything?

OS version?


Have you considered just making a .command file, which Terminal will run, and setting that as a Startup Item? Maybe no need for cron or other tricks, just tell Terminal what to run.
chown33 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

Similar Threads
thread Thread Starter Forum Replies Last Post
I need help with some scripting flash1996 Mac Basics and Help 0 Mar 30, 2014 09:01 PM
need help on bash scripting tonkpils Mac Programming 6 Dec 10, 2013 08:37 AM
In need of scripting advice ebobster Mac Programming 1 May 15, 2013 10:26 AM
Scripting Outlook sitryd Mac Programming 2 Mar 14, 2013 12:28 PM
Keynote scripting activate Mac Programming 2 Nov 1, 2012 02:33 AM

Forum Jump

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

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

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