Need help: Perl scripting

Discussion in 'Mac Programming' started by iAintKnowMac, Jun 28, 2013.

  1. iAintKnowMac macrumors newbie

    Jun 28, 2013
    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?
  2. iAintKnowMac thread starter macrumors newbie

    Jun 28, 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?
  3. chown33 macrumors 604

    Aug 9, 2009
    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.
  4. iAintKnowMac thread starter macrumors newbie

    Jun 28, 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.
  5. chown33 macrumors 604

    Aug 9, 2009
    Post more details:

    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.

Share This Page