403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.138.34.80
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/scheduler/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/scheduler/job.rb
module Puppet::Scheduler
  class Job
    attr_reader :run_interval
    attr_accessor :last_run
    attr_accessor :start_time

    def initialize(run_interval, &block)
      self.run_interval = run_interval
      @last_run = nil
      @run_proc = block
      @enabled = true
    end

    def run_interval=(interval)
      @run_interval = [interval, 0].max
    end

    def ready?(time)
      if @last_run
        @last_run + @run_interval <= time
      else
        true
      end
    end

    def enabled?
      @enabled
    end

    def enable
      @enabled = true
    end

    def disable
      @enabled = false
    end

    def interval_to_next_from(time)
      if ready?(time)
        0
      else
        @run_interval - (time - @last_run)
      end
    end

    def run(now)
      @last_run = now
      if @run_proc
        @run_proc.call(self)
      end
    end
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit