Skip to content

0522andrew/Auto_clock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Auto clock in/out on NCU HumanSys

Dependency

  • Python3
  • requests
  • lxml

How to Use

  1. Make sure you have installed the dependencies.

        $ pip3 install requests lxml
    
  2. Set these parameters in config.py

    Parameters description
    account Account on Portal
    password Password on Portal
    PartTimeId Get from the url of the page you clock in/out
    AttendWork Job content
    DayofWeek_Clock Weekday you want to clock in/out, 0 is Monday and 6 is Sunday
  3. Set the script executable.

        $ sudo chmod 777 Auto_clock/clock_in.py
        $ sudo chmod 777 Auto_clock/clock_out.py
    
  4. Time calibration.

  5. Config the crontab.

        $ crontab -e
    
        # minute hour day month dayofweek COMMAND
        0 8 1-7 * * python3 /PATH/TO/Auto_clock/clock_in.py
        2 18 1-7 * * python3 /PATH/TO/Auto_clock/clock_out.py
        # For example, 50 hours per month.
    

About

Auto clock in/out on NCU HumanSys

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%