Publish: 2018-11-20 | Modify: 2018-11-20
If you have used Windows Task Scheduler or Linux's crontab
, then the term "scheduled task" may not be unfamiliar to you. In short, it refers to executing a task at a set time or cyclically based on conditions. In Linux, crontab
needs to be operated through the command line, but with jiacrontab, you can create scheduled tasks through a web interface, which is much simpler than using crontab
directly.
jiacrontab is developed in Golang, and the author has provided pre-compiled binary packages, which can be downloaded and used directly, making it very convenient.
# Install unzip
yum -y install unzip
# Download jiacrontab
wget https://jiacrontab.iwannay.cn/download/jiacrontab-v1.4.5-linux-amd64.zip
# If the download speed is slow, you can replace it with the xiaoz software library address
wget http://soft.xiaoz.org/linux/jiacrontab-v1.4.5-linux-amd64.zip
# Unzip
unzip jiacrontab-v1.4.5-linux-amd64.zip
# Run the server
cd app/jiacrontab/server
nohup ./jiaserver &> jiaserver.log &
# Run the client
cd app/jiacrontab/client
nohup ./jiaclient &> jiaclient.log &
Allow access to the ports. The jiacrontab server and client listen on ports 20000 - 20003
. Run the following command to allow access:
# Allow ports in 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
Then access http://IP:20000
to see the jiacrontab web interface. The initial username is admin
and the password is 123456
.
server/server.ini
, which includes username, password, SMTP settings, etc. It is recommended to modify it.client/client.ini
, mainly for modifying the default email recipient for alarms.nohup
command.admin
, password: 123456
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.