Tasks is a java app which do some jobs. These jobs started by schedule. Also jobs more complicated than bash scripts.
In this time we support these things:
Download and send by email e-version of popular (nope) russian magazines and papers. At this time we support:
Periodic check torrents on popular (nope) trackers and download it if they changed. At this time we support trackers:
- RuTor
- Rutracker
- Java 21
- MongoDB
- SMTP server (optional)
- Telegram bot (optional)
- Clone this repo on your machine
- In the project dir run
./gradlew build
orgradlew.bat build
prefers to your OS. - Find in
build/libs
dirtasks-all.jar
and copy it to desired location. - Place with jar properties file (see below)
- Run
java -jar tasks-all.jar
- At this time we not support add task from admin web page. Honestly we doesnt have admin page. So you must create your tasks manully. To do this you must create record in mongodb.
# port of http server
http.port = 8080
# connection params to mongodb
mongo.host = 127.0.0.1
mongo.port = 27017
mongo.db = tasks
mongo.user =
mongo.pass =
# mail send params
mail.user =
mail.pass =
mail.host =
mail.port =
mail.from =
system.tmpdir = /opt/tmp
# curl extra params, e.g. socks proxy
curl.extra-opts = --socks5 user:pass@server:port
{
"job": "sb.tasks.jobs.DailyPress",
"params": {
"mail_to": [
"recipient1",
"recipient2"
],
"subject": "< Mail subject >",
"text": "< Mail text >",
"url": "http://www.sport-express.ru/"
},
"vars": {
"name": "Спорт-Экспресс"
},
"schedule": [
"0 0 0/2 * * ?",
"0 10/10 4,6 * * ?"
]
}
for rutracker.org params section must contains num field
{
"job": "sb.tasks.jobs.trupd.Trupd",
"params": {
"num": "< torrent num on rutracker.org >",
"mail_to": [
"recipient1",
"recipient2"
],
"admin_telegram": "< chatId for notification >"
},
"schedule": [
"0 0 * * * ?"
]
}
for others - url field
{
"job": "sb.tasks.jobs.trupd.Trupd",
"params": {
"url": "https://www.lostfilm.tv/series/Riverdale/",
"download_dir": "/opt/torrents",
"mail_to": "< notification mail address >",
"telegram": "< notification telegram chatId >"
},
"schedule": [
"0 0 * * * ?"
]
}
Tasks doesnt provide a telegram bot. To start using telegram notification you must create own telegram bot and set webhook for it in you host. More on Telegram Bot API
Supported telegram commands:
1. | /start | Start using telegram bot. In answer you receive a chatId |
2. | /admin | Register new user with admin privileges |
2. | /task | Add torrent update tasks |
3. | /ls | List all tasks |
4. | /info | Info about task |
5. | /rm | Delete task |