Re: [Mono-dev] Mono/Windows Services

2015-06-13 Thread Edward Ned Harvey (mono)
 From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-
 boun...@lists.ximian.com] On Behalf Of Paul McEwan
 
 Thanks, the mono-service tool is working well so far

Glad it's working for you. I never had any luck with mono-service and 
mono-service2. What we did, instead, was to create a console application, and 
let upstart or systemd manage it. Easy peasy.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono/Windows Services

2015-06-12 Thread Paul McEwan
Thanks, that's working well so far

On Thu, Jun 11, 2015 at 5:00 PM, Slide slide.o@gmail.com wrote:

 Mono has mono-service2 that you can use to wrap a Windows service on *nix
 to become a daemon that you can issue start and stop commands to like most
 daemons.

 On Thu, Jun 11, 2015 at 1:50 PM Paul McEwan paul.mce...@atlium.com
 wrote:

 I have a Windows Service that I converted to Mono.  What's the
 recommended way to keep it running in the background like a Windows Service
 -- i.e. you start it and it keeps running until you stop it?

 Should you just put a loop in the main thread that sleeps and wakes up
 every second and performs work?

 Or is there a better way?


 --

 This message contains confidential information and is intended only for
 the individual named. If you are not the named addressee you should not
 disseminate, distribute or copy this e-mail. Please notify the sender
 immediately by e-mail if you have received this e-mail by mistake and
 delete this e-mail from your system. E-mail transmission cannot be
 guaranteed to be secure or error-free as information could be intercepted,
 corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
 The sender therefore does not accept liability for any errors or omissions
 in the contents of this message, which arise as a result of e-mail
 transmission. If verification is required please request a hard-copy
 version. Atlium Global Services, 3438 East Lake Rd, Ste 14, PMB #664, Palm
 Harbor, FL  34685


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



-- 

--

This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and 
delete this e-mail from your system. E-mail transmission cannot be 
guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. 
The sender therefore does not accept liability for any errors or omissions 
in the contents of this message, which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy 
version. Atlium Global Services, 3438 East Lake Rd, Ste 14, PMB #664, Palm 
Harbor, FL  34685

 
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono/Windows Services

2015-06-12 Thread Paul McEwan
Thanks, the mono-service tool is working well so far

On Thu, Jun 11, 2015 at 5:01 PM, Oskar Berggren oskar.bergg...@gmail.com
wrote:

 You can use the mono-service tool to start the application through the
 ServiceBase class, as in Windows.

 But ServiceBase or not, typically you would enter some sort of mainloop.
 Most services will _wait_ for something to happen and not wake up until it
 does. High-frequency timer-based polling should only be used as a last
 resort - i.e. if there is no practically useful construct that you can wait
 on. You can do timer-based if you have long sleep times (such as every hour
 or less), or if the service's purpose is time-based data collection.

 /Oskar




 2015-06-11 21:49 GMT+01:00 Paul McEwan paul.mce...@atlium.com:

 I have a Windows Service that I converted to Mono.  What's the
 recommended way to keep it running in the background like a Windows Service
 -- i.e. you start it and it keeps running until you stop it?

 Should you just put a loop in the main thread that sleeps and wakes up
 every second and performs work?

 Or is there a better way?


 --

 This message contains confidential information and is intended only for
 the individual named. If you are not the named addressee you should not
 disseminate, distribute or copy this e-mail. Please notify the sender
 immediately by e-mail if you have received this e-mail by mistake and
 delete this e-mail from your system. E-mail transmission cannot be
 guaranteed to be secure or error-free as information could be intercepted,
 corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
 The sender therefore does not accept liability for any errors or omissions
 in the contents of this message, which arise as a result of e-mail
 transmission. If verification is required please request a hard-copy
 version. Atlium Global Services, 3438 East Lake Rd, Ste 14, PMB #664, Palm
 Harbor, FL  34685



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




-- 

--

This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and 
delete this e-mail from your system. E-mail transmission cannot be 
guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. 
The sender therefore does not accept liability for any errors or omissions 
in the contents of this message, which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy 
version. Atlium Global Services, 3438 East Lake Rd, Ste 14, PMB #664, Palm 
Harbor, FL  34685

 
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono/Windows Services

2015-06-11 Thread Slide
Mono has mono-service2 that you can use to wrap a Windows service on *nix
to become a daemon that you can issue start and stop commands to like most
daemons.

On Thu, Jun 11, 2015 at 1:50 PM Paul McEwan paul.mce...@atlium.com wrote:

 I have a Windows Service that I converted to Mono.  What's the recommended
 way to keep it running in the background like a Windows Service -- i.e. you
 start it and it keeps running until you stop it?

 Should you just put a loop in the main thread that sleeps and wakes up
 every second and performs work?

 Or is there a better way?


 --

 This message contains confidential information and is intended only for
 the individual named. If you are not the named addressee you should not
 disseminate, distribute or copy this e-mail. Please notify the sender
 immediately by e-mail if you have received this e-mail by mistake and
 delete this e-mail from your system. E-mail transmission cannot be
 guaranteed to be secure or error-free as information could be intercepted,
 corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
 The sender therefore does not accept liability for any errors or omissions
 in the contents of this message, which arise as a result of e-mail
 transmission. If verification is required please request a hard-copy
 version. Atlium Global Services, 3438 East Lake Rd, Ste 14, PMB #664, Palm
 Harbor, FL  34685


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Mono/Windows Services

2015-06-11 Thread Paul McEwan
I have a Windows Service that I converted to Mono.  What's the recommended
way to keep it running in the background like a Windows Service -- i.e. you
start it and it keeps running until you stop it?

Should you just put a loop in the main thread that sleeps and wakes up
every second and performs work?

Or is there a better way?

-- 

--

This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and 
delete this e-mail from your system. E-mail transmission cannot be 
guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. 
The sender therefore does not accept liability for any errors or omissions 
in the contents of this message, which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy 
version. Atlium Global Services, 3438 East Lake Rd, Ste 14, PMB #664, Palm 
Harbor, FL  34685

 
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono/Windows Services

2015-06-11 Thread Oskar Berggren
You can use the mono-service tool to start the application through the
ServiceBase class, as in Windows.

But ServiceBase or not, typically you would enter some sort of mainloop.
Most services will _wait_ for something to happen and not wake up until it
does. High-frequency timer-based polling should only be used as a last
resort - i.e. if there is no practically useful construct that you can wait
on. You can do timer-based if you have long sleep times (such as every hour
or less), or if the service's purpose is time-based data collection.

/Oskar




2015-06-11 21:49 GMT+01:00 Paul McEwan paul.mce...@atlium.com:

 I have a Windows Service that I converted to Mono.  What's the recommended
 way to keep it running in the background like a Windows Service -- i.e. you
 start it and it keeps running until you stop it?

 Should you just put a loop in the main thread that sleeps and wakes up
 every second and performs work?

 Or is there a better way?


 --

 This message contains confidential information and is intended only for
 the individual named. If you are not the named addressee you should not
 disseminate, distribute or copy this e-mail. Please notify the sender
 immediately by e-mail if you have received this e-mail by mistake and
 delete this e-mail from your system. E-mail transmission cannot be
 guaranteed to be secure or error-free as information could be intercepted,
 corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
 The sender therefore does not accept liability for any errors or omissions
 in the contents of this message, which arise as a result of e-mail
 transmission. If verification is required please request a hard-copy
 version. Atlium Global Services, 3438 East Lake Rd, Ste 14, PMB #664, Palm
 Harbor, FL  34685



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono/Windows Services

2015-06-11 Thread Bryan Crotaz
Turn an exe into a daemon:

http://serverfault.com/questions/135859/is-there-a-standard-way-to-make-daemon-in-debian

To keep it idle, I'd suggest using Task objects, with a lambda for each
task with the work in it. They'll run on the thread pool. Then your main
thread should just sleep until a kill message comes in.

On 11 June 2015 at 21:49, Paul McEwan paul.mce...@atlium.com wrote:

 I have a Windows Service that I converted to Mono.  What's the recommended
 way to keep it running in the background like a Windows Service -- i.e. you
 start it and it keeps running until you stop it?

 Should you just put a loop in the main thread that sleeps and wakes up
 every second and performs work?

 Or is there a better way?


 --

 This message contains confidential information and is intended only for
 the individual named. If you are not the named addressee you should not
 disseminate, distribute or copy this e-mail. Please notify the sender
 immediately by e-mail if you have received this e-mail by mistake and
 delete this e-mail from your system. E-mail transmission cannot be
 guaranteed to be secure or error-free as information could be intercepted,
 corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
 The sender therefore does not accept liability for any errors or omissions
 in the contents of this message, which arise as a result of e-mail
 transmission. If verification is required please request a hard-copy
 version. Atlium Global Services, 3438 East Lake Rd, Ste 14, PMB #664, Palm
 Harbor, FL  34685



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




-- 
Bryan Crotaz
Managing Director
Silver Curve
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list