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

iAintKnowMac

macrumors newbie
Original poster
Jun 28, 2013
3
0
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

macrumors newbie
Original poster
Jun 28, 2013
3
0
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?
 

chown33

Moderator
Staff member
Aug 9, 2009
10,706
8,346
A sea of green
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.
 

iAintKnowMac

macrumors newbie
Original poster
Jun 28, 2013
3
0
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.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,706
8,346
A sea of green
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.