hh resume booster: free auto-bump for hh.ru (Playwright, Linux/Win/Mac)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key> <string>com.stackops.hhbump</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>__DIR__/.venv/bin/python</string>
|
||||
<string>__DIR__/bump_resumes.py</string>
|
||||
</array>
|
||||
<key>StartInterval</key> <integer>7200</integer>
|
||||
<key>RunAtLoad</key> <true/>
|
||||
<key>StandardOutPath</key> <string>__DIR__/bump.out.log</string>
|
||||
<key>StandardErrorPath</key><string>__DIR__/bump.err.log</string>
|
||||
<key>ProcessType</key> <string>Background</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=hh resume booster (одноразовый прогон)
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=__DIR__
|
||||
ExecStart=__DIR__/.venv/bin/python __DIR__/bump_resumes.py
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Запуск hh resume booster каждые 2 часа
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitActiveSec=2h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Linux: ставит systemd user-timer (каждые 2ч) с автоподстановкой путей.
|
||||
set -e
|
||||
DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
mkdir -p "$HOME/.config/systemd/user"
|
||||
sed "s#__DIR__#$DIR#g" "$DIR/scheduler/hhbump.service" > "$HOME/.config/systemd/user/hhbump.service"
|
||||
cp "$DIR/scheduler/hhbump.timer" "$HOME/.config/systemd/user/hhbump.timer"
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now hhbump.timer
|
||||
# чтобы таймер работал и когда вы не залогинены в графическую сессию:
|
||||
loginctl enable-linger "$USER" 2>/dev/null || true
|
||||
echo "✅ Установлено. Проверка: systemctl --user list-timers | grep hhbump"
|
||||
echo " Разовый прогон сейчас: systemctl --user start hhbump.service"
|
||||
echo " Остановить: systemctl --user disable --now hhbump.timer"
|
||||
echo " Логи: $DIR/bump.log (и: journalctl --user -u hhbump.service)"
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# macOS: ставит launchd-агент (каждые 2ч) с автоподстановкой путей.
|
||||
set -e
|
||||
DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
PLIST="$HOME/Library/LaunchAgents/com.stackops.hhbump.plist"
|
||||
mkdir -p "$HOME/Library/LaunchAgents"
|
||||
sed "s#__DIR__#$DIR#g" "$DIR/scheduler/com.stackops.hhbump.plist" > "$PLIST"
|
||||
launchctl bootout "gui/$(id -u)/com.stackops.hhbump" 2>/dev/null || true
|
||||
launchctl bootstrap "gui/$(id -u)" "$PLIST"
|
||||
echo "✅ Установлено. Проверка: launchctl list | grep hhbump"
|
||||
echo " Остановить: launchctl bootout gui/\$(id -u)/com.stackops.hhbump"
|
||||
echo " Логи: $DIR/bump.log"
|
||||
@@ -0,0 +1,16 @@
|
||||
# Windows: регистрирует задачу в Планировщике (каждые 2 часа).
|
||||
# Запуск: правой кнопкой -> "Выполнить с помощью PowerShell", ИЛИ в PowerShell:
|
||||
# powershell -ExecutionPolicy Bypass -File .\scheduler\install-windows.ps1
|
||||
$Root = (Resolve-Path "$PSScriptRoot\..").Path
|
||||
$Bat = Join-Path $Root "scheduler\run.bat"
|
||||
$Action = New-ScheduledTaskAction -Execute $Bat
|
||||
$Trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) `
|
||||
-RepetitionInterval (New-TimeSpan -Hours 2) -RepetitionDuration ([TimeSpan]::MaxValue)
|
||||
$Settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -AllowStartIfOnBatteries `
|
||||
-DontStopIfGoingOnBatteries
|
||||
Register-ScheduledTask -TaskName "hhbump" -Action $Action -Trigger $Trigger `
|
||||
-Settings $Settings -Description "hh resume booster" -Force
|
||||
Write-Host "OK. Проверка: schtasks /Query /TN hhbump"
|
||||
Write-Host "Разовый прогон: schtasks /Run /TN hhbump"
|
||||
Write-Host "Удалить: schtasks /Delete /TN hhbump /F"
|
||||
Write-Host "Логи: $Root\bump.log"
|
||||
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
REM Обёртка для Планировщика заданий Windows.
|
||||
cd /d "%~dp0.."
|
||||
".venv\Scripts\python.exe" bump_resumes.py
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Обёртка для планировщиков (launchd/cron/systemd) — идёт в корень пакета и запускает бустер.
|
||||
cd "$(dirname "$0")/.." || exit 1
|
||||
exec ./.venv/bin/python bump_resumes.py
|
||||
Reference in New Issue
Block a user