Examples of Crontab


Examples of hudson.scheduler.CronTab

        this.cron = cron;
    }

    @Override
    public CronTab getCronTab() throws ANTLRException {
        return new CronTab(cron);
    }
View Full Code Here

Examples of hudson.scheduler.CronTab

    public abstract CronTab getCronTab() throws ANTLRException;
   
    @Override
    public long getRecurrencePeriod() {
        try {
            CronTab tab = getCronTab();
            GregorianCalendar now = new GregorianCalendar();
            Calendar nextExecution = tab.ceil(now.getTimeInMillis());
            long period = nextExecution.getTimeInMillis() - now.getTimeInMillis();
            if(nextExecution.getTimeInMillis() - now.getTimeInMillis()<=60000)
                period = period + 60000l; //add one minute to not shedule it during one minute one than once
            return period;          
        } catch (Exception ex) {
View Full Code Here

Examples of hudson.scheduler.CronTab

    }

    @Override
    public CronTab getCronTab() throws ANTLRException {
        String cron = Jenkins.getInstance().getPlugin(DiskUsagePlugin.class).getConfiguration().getCountIntervalForJobs();
        CronTab tab = new CronTab(cron);
        return tab;
    }
View Full Code Here

Examples of hudson.scheduler.CronTab

    }

    @Override
    public CronTab getCronTab() throws ANTLRException {
        String cron = Jenkins.getInstance().getPlugin(DiskUsagePlugin.class).getConfiguration().getCountIntervalForWorkspaces();
        CronTab tab = new CronTab(cron);
        return tab;
    }
View Full Code Here

Examples of hudson.scheduler.CronTab

        }
    }
   
    public CronTab getCronTab() throws ANTLRException{
        String cron = Jenkins.getInstance().getPlugin(DiskUsagePlugin.class).getConfiguration().getCountIntervalForBuilds();
        CronTab tab = new CronTab(cron);
        return tab;
    }  
View Full Code Here

Examples of l2p.util.Crontab

  {
//    if(player.isGM())
//    {
//      return 0;
//    }
    Crontab resetReuse = getResetReuseByName(name);
    if(resetReuse == null)
    {
      return 0;
    }
    String var = player.getVar(name);
    if(var == null)
    {
      return 0;
    }
    return (int) Math.max((resetReuse.timeNextUsage(Long.parseLong(var)) - System.currentTimeMillis()) / 60000, 0);
  }
View Full Code Here

Examples of l2p.util.Crontab

      }
      Document doc = factory.newDocumentBuilder().parse(file);
      NamedNodeMap attrs;
      Integer instanceId;
      String name;
      Crontab resetReuse; // Сброс реюза по умолчанию в каждые сутки в 0:00
      int timelimit = -1;
      boolean dispellBuffs;
      Integer roomId;
      int mobId, doorId, respawn, respawnRnd, count;
      // 0 - точечный, в каждой указанной точке; 1 - один точечный спаун в рандомной точке; 2 - локационный
      int spawnType;
      L2Spawn spawnDat;
      L2NpcTemplate template;
      L2DoorInstance door;
      InstancedZone instancedZone;
      for(Node iz = doc.getFirstChild(); iz != null; iz = iz.getNextSibling())
      {
        if("list".equalsIgnoreCase(iz.getNodeName()))
        {
          for(Node area = iz.getFirstChild(); area != null; area = area.getNextSibling())
          {
            if("instance".equalsIgnoreCase(area.getNodeName()))
            {
              attrs = area.getAttributes();
              instanceId = Integer.parseInt(attrs.getNamedItem("id").getNodeValue());
              name = attrs.getNamedItem("name").getNodeValue();
              if(!_names.contains(name))
              {
                _names.add(name);
              }
              resetReuse = new Crontab(attrs.getNamedItem("resetReuse").getNodeValue());
              Node nodeTimelimit = attrs.getNamedItem("timelimit");
              if(nodeTimelimit != null)
              {
                timelimit = Integer.parseInt(nodeTimelimit.getNodeValue());
              }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.