Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > Team MacNN > Running progs as a daemon/service?

Running progs as a daemon/service?
Thread Tools
Mal495
Fresh-Faced Recruit
Join Date: Jan 2003
Location: Richmond Hill, NY USA
Status: Offline
Reply With Quote
Mar 22, 2004, 11:54 PM
 
Is there anyone out there who knows how to run the Ubero Agent or SETI@Home as a Daemon, which is similar to a service in WinNT. It should run in the background with no screen output, even before log-on. This should be possible, just haven't found anyone who really knows how to do it yet?


Thanx in advance,
-Rob


---------------------

http://quiz.ngsec.biz:8080/
     
OneMacGuy
Senior User
Join Date: Oct 2002
Location: God's Country, The South
Status: Offline
Reply With Quote
Mar 23, 2004, 05:13 PM
 
Originally posted by Mal495:
Is there anyone out there who knows how to run the Ubero Agent or SETI@Home as a Daemon, which is similar to a service in WinNT. It should run in the background with no screen output, even before log-on. This should be possible, just haven't found anyone who really knows how to do it yet?


Thanx in advance,
-Rob


---------------------

http://quiz.ngsec.biz:8080/
In Windows or nix? If it is Windoze, I can help with that, if nix, there is plenty of expertise here. I am pretty sure that you would do it with a crontab, but I do not know how to set one up.
     
Mal495  (op)
Fresh-Faced Recruit
Join Date: Jan 2003
Location: Richmond Hill, NY USA
Status: Offline
Reply With Quote
Mar 23, 2004, 05:24 PM
 
"Windows or nix?" what is nix?
Anyway, im trying to do it in OS X 10.2

Mabey something to do with crontab? I wouldnt know. someone once said it could be done by moving the actual app to System/Library/StartupItems but that hasnt worked.


-Rob



-----------------------------------------------

Web Authentication Games
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Mar 23, 2004, 06:45 PM
 
nix = *nix = unix-type operating systems. These include UNIX, Linux, FreeBSD, OpenBSD, NetBSD, Next, Mac OSX, and (I believe) BEOS.

A daemon is a unix-type background process that has no user interface, it does not put up dialog boxes or windows to interact with the user.

'cron' is itself a daemon, a scheduling utility. It sits in the background, and launches other processes at particular times. You can add to it's schedule, to launch a program at any desired time - a fixed time, or even on bootup. For the launched program to run invisible, it will need to be the CLI version of a project, something that does not generate user windows.

I wrote up some basic cron usage instructions here. It was in answer to a Folding@home question, but most of the info equally applies to all projects.

For more detailed explanations of what you can do with cron, visit our crontab guide here.

A search of the Team Forum for 'cron' or 'crontab' will reveal a wealth of further information, this is a common subject and many people have posted interesting tips. They are even available to visiting members of other teams such as yourself.
     
Mal495  (op)
Fresh-Faced Recruit
Join Date: Jan 2003
Location: Richmond Hill, NY USA
Status: Offline
Reply With Quote
Mar 23, 2004, 07:07 PM
 
Thanx, I should have guessed; nix=Unix.

So let me get this staight. cron only runs CLI apps as a daemon, and no GUI app can be run in this way. Also, Cron can run these apps even before logon?

Is there a GUI for cron or is it just a CLI utility and what would be the commands to be typed in the cli for cron.

I will check those links later, im late for school now.

Thanx again
-Rob




---------------------

http://quiz.ngsec.biz:8080/
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Mar 23, 2004, 09:11 PM
 
cron can launch any application - but if the application is a regular GUI client, then the launched client will generate user windows and a Dock icon. CLI clients as a rule do not spawn windows or dialogs, so they are 'safe'. It might be possible to launch a GUI app and instruct the Finder to keep the app hidden -- but this is not a safe way to hide a client. Various common utilities or system extensions will show hidden GUI applications anyway, such as ASM or even the Dock if someone has used TinkerTool to adjust the Dock's preferences.

All user crons are launched on schedule, regardless of who is logged in. Even if no one is logged in, all user crons will launch.

CronniX is a GUI utility for cron, the main weakness is that it doesn't currently support the '@reboot' command very well, which us DC types use a lot. This may be fixed in a future version.

The links contain instructions for editing the crontab via the Terminal.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:39 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,