I am looking for a cron replacement which could run subsecond schedule, is there have any "still alive" project which serve this purpose?

Currently running Ubuntu 14

  • 3
  • Maybe that script could help? It should be easily adaptable for delays < 1s. – Martin von Wittich Nov 13 '14 at 15:12
  • I haven't used systemd yet, but maybe systemd timers could be used for this? – Martin von Wittich Nov 13 '14 at 15:16
  • 1
    What do you want to do exactly? There'll be a delay due to the time it takes for cron to launch an external program. With subsecond precision, that delay is non-negligible. You should probably include the fine timer directly in your application for minimal lag. – Gilles 'SO- stop being evil' Nov 13 '14 at 23:34
  • I want to execute task based on second, for example: 15:23:37 execute echo Currently Ubuntu doesn't use systemd (I think it's RHEL7 thing) – Thomas G. Lau Nov 14 '14 at 3:04

There don't seem to be any well-supported tools in existence for this. I'd say the right way to do this is to build a daemon. You can build a daemon in almost any language you're comfortable with. In Java, for example, you could use quartz to handle the scheduling aspect, and you can find many examples online of how to write a daemon in Java. Python or Perl would probably be a more appropriate tool to use in a *nix environment, however.

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