Jiacrontab 2.x Release: A Simple and Reliable Task Management Tool with Support for Second-level Scheduled Tasks

Publish: 2019-08-20 | Modify: 2019-08-20

jiacrontab is a cron job tool written in golang. In the article "Using jiacrontab to build a visual cron job", jiacrontab 1.4x version was introduced. After continuous efforts by the author, version 2.x has been developed with more powerful features and a more beautiful interface. If you are still looking for a visual cron job tool, jiacrontab 2.x is a good choice.

jiacrontab 2.x has made some changes to its software architecture, as follows:

  • jiacrontab consists of two parts: jiacrontab_admin and jiacrontabd, which communicate with each other through rpc.
  • jiacrontab_admin: provides a web interface for users to operate.
  • jiacrontabd: responsible for job data storage and task scheduling.

To install jiacrontab 2.x, you can download the official compiled binary file from https://jiacrontab.iwannay.cn/download/. However, the download speed from the official website is too slow. You can use the software library on my blog to download and install it.

# Download jiacrontab
wget http://soft.xiaoz.org/linux/jiacrontab-v2.0.3-linux-amd64.zip
# Unzip
unzip jiacrontab-v2.0.3-linux-amd64.zip
# Enter jiacrontab_admin directory
cd jiacrontab_admin
# Run jiacrontab_admin
nohup ./jiacrontab_admin &> jiacrontab_admin.log &
# Enter jiacrontabd directory
cd jiacrontabd
# Run jiacrontabd
nohup ./jiacrontabd &> jiacrontabd.log &

Open the ports. The jiacrontab server and client listen on ports 20000 - 20003. Run the following command to open the ports:

# Open ports with firewalld
firewall-cmd --zone=public --add-port=20000-20003/tcp --permanent
firewall-cmd --reload
# If using iptables
iptables -I INPUT -p tcp --dport 20000 -j ACCEPT
iptables -I INPUT -p tcp --dport 20001 -j ACCEPT
iptables -I INPUT -p tcp --dport 20002 -j ACCEPT
iptables -I INPUT -p tcp --dport 20003 -j ACCEPT
iptables save
service iptables restart 

Initialize jiacrontab 2.x by visiting http://IP:2000. You will see the web interface, where you need to set a username, password, and email for the first time. Follow the prompts to complete the initialization and then you can log in to the admin panel.

If you don't like accessing it through http://IP:2000, you can use Nginx reverse proxy to access it through a domain name. Below is an example of Nginx reverse proxy configuration for jiacrontab:

server {
    listen 80;
    server_name     cron.ttt.sh;

    charset utf-8,gbk;
    location / {
        proxy_pass http://127.0.0.1:20000;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

There are some changes in jiacrontab 2.x compared to version 1.4x. The interface is cleaner and more options are added. It also supports second-level cron jobs, which is very convenient for tasks that require accuracy to the second.

In summary, jiacrontab is suitable for Linux system administrators or webmasters familiar with Linux commands. Otherwise, it may be difficult to understand what jiacrontab is for. Jiacrontab has more features for you to explore.


Comments