• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Launch a background task
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Launch a background task


  • Subject: Launch a background task
  • From: Arthur VIGAN <email@hidden>
  • Date: Sun, 02 Jun 2002 21:29:37 +0200

Hi,

I'm trying to do a little application which would launch some background
tasks (in fact shell scripts). I would like to know how I can launch them
from my application. I tried to use an NSTask, but the result wasn't very
good. For instance I tried:

- (void)runScript
{
NSTask *scriptTask = [[NSTask alloc] init];

[sciptTask setLaunchPath:@"~/bin/myScript"];
[scriptTask launch];
}

But I got the following error (ScriptMenu is the name of my app):

2002-06-02 21:26:11.491 ScriptMenu[2243] Task create for path
/Users/arthur/bin/myScript failed.

What should I do?


Arthur
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Launch a background task
      • From: Andy Lee <email@hidden>
    • Re: Launch a background task
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: DeveloperTools and simple question
  • Next by Date: Re: DeveloperTools and simple question
  • Previous by thread: Re: DeveloperTools and simple question
  • Next by thread: Re: Launch a background task
  • Index(es):
    • Date
    • Thread