[X-Unix] Manual launch of a timed launchd task?

macosxforme macosxforme at gmail.com
Sat Mar 4 18:12:19 PST 2006


On 3/2/06 3:17 PM, "Jeff Porten" <civitan at jeffporten.com> wrote:

> I've got several tasks set up to go off at 3 AM on a server I'm using
> (Tiger Server).  Working from the command line, so I manually put the
> files in /Library/LaunchDaemons and loaded them.
> 
> What I'd like to do is fire them up now and see if they work.  But
> when I do launchctl start, nothing happens -- I presume that the 3 AM
> launch is overriding the start command.  How do I tell these to fire
> immediately?
> 
> Corollary question: I have two tasks loaded that I can't unload
> because the files no longer exist.  I'd rather not reboot the
> server.  How do I drop these from the job list?  I noticed the
> shutdown command, but I don't want to unload the System tasks.
> 
> Thanks,
> Jeff
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix
> 
> Listmom is trying to clean out his closets! Vintage Mac and random stuff:
>          http://search.ebay.com/_W0QQsassZmacguy1984

To manually launch the scripts called by your launchd .plist, you should
simply invoke it manually, ie:

$ sudo /usr/local/bin/<yourscriptnamehere.sh>

To unload a launchd job, use:

$ sudo launchctl unload -w /Library/LaunchDaemons/yourlaunchditem.plist

 read further in: man launchctl




More information about the X-Unix mailing list