Giter Site home page Giter Site logo

tasks-scheduler's Introduction

A device must schedule 5 tasks with the following Requirements:

  • Task A must run every second
  • Task B must run every 5 seconds
  • Task C must run every 5 seconds
  • Task D must run every 10 seconds
  • Task E must run every 10 seconds
  • There must be no more than 2 tasks running at the same time
  • It is OK if tasks B and C run for the first time before the first 5s elapsed
  • It is OK if tasks D and E run for the first time before the first 10s elapsed

How to run the program

  1. Checkout the code from this repo. e.g. git clone https://github.com/jkonst/tasks-scheduler.git
  2. Ensure that Java is installed on your computer. (Current version of the program is using Java 17).
  3. Create a directory for compiled classes. mkdir out
  4. Compile all Java classes javac -d out src/jkonst/debiotech/main/*.java
  5. Package into an executable JAR: jar cvfm MyTasksScheduler.jar src/META-INF/MANIFEST.MF -C out/ .
  6. Run the JAR java -jar MyTasksScheduler.jar
    • You can pass as an argument the total time of execution in seconds (only positive integer values allowed) e.g. java -jar MyTasksScheduler.jar 10

tasks-scheduler's People

Contributors

jkonst avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.