public Scheduler parse(String str) {
        Matcher m = msh.matcher(str);
        if (m.find()) {
            TimeUnit t = null;
            if (str.contains("m")) t = TimeUnit.MINUTES;
            if (str.contains("s")) t = TimeUnit.SECONDS;
            if (str.contains("h")) t = TimeUnit.HOURS;
            return new PeriodicalScheduler(Integer.valueOf(m.group(1)), t);
        }
        Matcher d = atDate.matcher(str);
        if (d.find()) {
            return new SpecificTimeScheduler(Integer.valueOf(d.group(1)), Integer.valueOf(d.group(2)));
        }
        return null;
    }