2

I've been looking for a simple activator which can execute some code when stuff happens, I haven't found anything yet. Maybe, I am not using the right keywords. It would be great if someone pointed me to the right app.

These are the things I am looking for, in the activator:

  • An event should be able to trigger an arbitrary chunk of code
  • An event can be
    • a datetime, or a datetime match expression. (time: '16:00', day: 'monday' or day: 'monday', month: 'jan' etc,.)
    • a message on a socket?
    • anything written out to a device like /dev/*
    • a file creation, maybe in a special directory

If there is nothing which does this, would someone be interested in something like this?

A very basic configuration(written in ruby) for this would be:

trigger_when({:day => 6, :time => '10:30'}, {:message => 'Awesome message'}) # :day => 6 for sunday
trigger_when({:day => 0, :time => '10:30'}) do
  puts 'awesome stuff happens'
end

I have created a repo github hoping to create something like this , but it would be great if there is an existing app which does this.

There is an android app which seems to do almost the exact thing http://tasker.dinglisch.net/. I am looking for something which does it on a desktop.

1 Answer 1

2

There are a number of tools that do something like this, though not necessarily all of the above. For example, Apple's launchd will handle your time-of-day requirements as well as socket connections and monitored directories. The upstart program can respond to arbitrary events, although it generally expects the events to be generated by external programs (such as udev).

There are a number of tools (such as incron) that can respond to filesystem events.

You can probably mix-and-match to get what you want.

3
  • libevent linux.die.net/man/3/event event api to execute a function when a specific event on a file descriptor occurs or after a given time has passed. Dec 6, 2011 at 17:33
  • upstart would be perfect for my needs but it needs super user permissions to emit events, and it doesn't allow stuff to be executed at a certain time, It's on their todo list. Dec 6, 2011 at 17:38
  • I think AnyEvent is of interest here, too; it's a Perl module.
    – sr_
    Dec 7, 2011 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.