[MonoDevelop] Mono and Crontab

Adam Tauno Williams awilliam at whitemice.org
Fri Apr 2 08:13:26 EDT 2010


On Fri, 2010-04-02 at 01:28 -0800, Mark Devgood wrote:
> I am writing a simpler reminder system in Mono that will send emails at
> particular times. 
> My website is running on a Linux box and so I have Crontab at my disposal.
> I first created a simple webpage, that spawned a new thread that would sleep
> for 1 hour, and then kick of an email. It works for about 1-2 hours, then I
> notice it dies for some reason. My solution MUST be 100% robust, so I don't
> think this is the best option, as in addition my mono-server is currently
> setup to restart daily.

Yep, that won't work.

> Crontab does seem to be 100% robust, 

Really?  As a UNIX/LINUX admin for almost 20 years: cron is @*&$*@ crap.
It is absurd that LINUX still uses such a worthless schedular.

> and so I am quite happy with this, and
> I have found out how to send emails from it. There are a handful of posts of
> how to start a mono app from cron, but what I want to do is the opposite,
> create a cron job from my mono website. Is this possible?

Look up "quartz" which is a .NET schedular that works great in Mono.
Create a service [runs all the time] and lets you schedule notifications
via XML-RPC/SOAP/REST/whatever from your website.  It isn't very hard to
do [I'm surprised someone hasn't written a generic scheduling/job
service around quartz].



More information about the Monodevelop-list mailing list