Git Product home page Git Product logo

attendance-script's Introduction

Attendance-Script

Description

Bash script that checks attendance of logged in users on Ubuntu.

Configuration

All files have to be placed in the same directory as the bash script itself.

  1. Create students.txt that contains information about the date when a student should be logged in:
    user name day initial hour end hour
  • day in format: Mon, Tue, Wed, Thu, Fri, Sat, Sun
  • initial hour and end hour in format XX:XX
  1. Create an empty register.txt
  2. Create an empty t_register.txt
  3. Type in terminal sudo apt-get install moreutils
  4. Set automatic execution of the script
  • crontab -e
  • * 1 * * * /home/<user>/Desktop/attendance.sh (in case of having files on Desktop) Condition for the automatic execution to work:
  • chmod +x <cd and name> - changes permission by adding "x" to let crontab execute the script
    In order to have an attendance fully checked, the script needs to be run two times. Therefore, please adjust students' hours to crontab settings so that their attendance is checked twice.

How does it work?

The first time the attendance is checked, the information is put into t_register.txt.
If the user is still logged in during the second execution of the bash script, the attendance is removed from t_register.txt and goes to a permanent register.txt.
If the user is logged in only during one check, the permanent attendance is not registered.

attendance-script's People

Contributors

hynas321 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.