Here you can find the source of getCronBySecondScheduler(int second)
public static String getCronBySecondScheduler(int second)
//package com.java2s; public class Main { public static String getCronBySecondScheduler(int second) { if (second >= (24 * 60 * 60) || second == 0) { return null; }/*from w ww. j a v a 2 s.c om*/ int hh = 0; if (second >= 3600) { hh = second / 3600; second = second - (hh * 3600); } int mm = second / 60; int ss = second % 60; return (ss == 0 ? "0" : ("*/" + ss)) + (mm == 0 ? (ss == 0 ? (hh == 0 ? (" *") : " 0") : (hh == 0 ? " *" : " 0")) : (" */" + mm)) + (hh == 0 ? " *" : (" */" + hh)) + " * * ?"; } }