> On Apr 17, 2017, at 8:16 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> On Tue, Apr 18, 2017 at 4:44 AM, James Crate via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Every time I add some automatic process on the server, I wonder whether
>> there is either
>> 
>> a. some built-in functionality for this that I have completely missed
>> 
> 
> Nope. No cron or cron table. For the world's simplest implementation (and
> nothing you haven't probably already written yourself in the past):

A long time ago at Deep Sky I had written one. Given SGW’s love of the resource 
fork, that was obviously the “database” it used.  Hopefully none of that code 
is still being used anywhere...

I agree it’s not very difficult to write a job scheduler, but it’s tedious, and 
only a couple minutes to set up a process to run periodically. In this case the 
new jobs I am adding all need to run once/day, so writing a full-fledged 
scheduler will have to wait for another day.

> Given your background, it would probably take you a couple of hours to
> knock something out with the basics. But, yeah, date math testing is a
> nightmare. At least me, but I've got bird taxonomies filling up the parts
> of my brain where date math should be.

4D date/time math is annoying because you have to calculate with the date and 
time separately. 

I’m a bit spoiled with being able to just use cron to invoke jobs in Ruby/Rails 
systems. Cron wouldn’t be a great choice for a 4D system because 4D is not 
managed from the command line so it would be a pretty “invisible” part of the 
system. However, it does make me idly curious about how difficult it would be 
to tell a 4D Server to "do things” from the command line. I haven’t thought of 
anything clever, though. It could be done with a process listening on a local 
socket, and some external script that knows how to communicate with it, but 
that also feels tedious and inelegant to implement, and I don’t want it bad 
enough for that. Just thinking about all the send/receive packet and 4D string 
parsing...

Jim

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to