==================================================== ACTIVITYWATCH AUTO-SYNC SETUP GUIDE ==================================================== IMPORTANT: This folder (E:\timesheet\timesheet_new) contains scripts to automatically sync ActivityWatch with your database. ==================================================== QUICK START GUIDE ==================================================== Step 1: CHECK YOUR SETUP ------------------------ Run: CHECK-STATUS.bat This shows what's configured and what needs fixing. Step 2: CONFIGURE SYNC (if needed) ---------------------------------- The sync system uses the file: %LOCALAPPDATA%\ActivityWatchSync\sync.ps1 If this doesn't exist or has wrong credentials: - Run your developer setup web form first - Or run CONFIGURE-FIRST.bat to check settings Step 3: INSTALL AUTO-SYNC ------------------------- Run: ONE-CLICK-INSTALL.bat This installs everything automatically. Step 4: VERIFY IT'S WORKING --------------------------- 1. Check Task Manager for powershell.exe 2. Check your dashboard for updated times 3. Run CHECK-STATUS.bat again ==================================================== FILES IN THIS FOLDER ==================================================== MAIN INSTALLERS: - ONE-CLICK-INSTALL.bat = Simple automatic setup - SYNC-MANAGER.bat = Advanced menu system STATUS CHECKERS: - CHECK-STATUS.bat = Quick status check - CONFIGURE-FIRST.bat = Check sync configuration SYNC FILES: - sync.ps1 = PowerShell sync script (CHECK TOKEN!) - background-sync.bat = Batch file that runs continuously - hidden-launcher.vbs = VBS file that keeps it hidden ==================================================== HOW IT WORKS ==================================================== 1. The system checks for sync.ps1 in: %LOCALAPPDATA%\ActivityWatchSync\sync.ps1 2. A batch file runs this PowerShell script every 5 minutes 3. VBS launcher keeps everything hidden (no windows) 4. Multiple startup methods ensure it always runs: - Windows Startup folder - Scheduled tasks ==================================================== TROUBLESHOOTING ==================================================== Problem: "Invalid token" or no sync Solution: 1. Check sync.ps1 has correct token (not placeholder) 2. Run CONFIGURE-FIRST.bat 3. Re-run developer setup if needed Problem: ActivityWatch not running Solution: 1. Start ActivityWatch manually 2. Make sure it's on http://localhost:5600 Problem: No PowerShell process Solution: 1. Run ONE-CLICK-INSTALL.bat 2. Check Windows Defender/Antivirus Problem: Sync stopped working Solution: 1. Run SYNC-MANAGER.bat 2. Choose option 5 (Troubleshoot) 3. Or option 7 (Restart sync) ==================================================== FOR DEVELOPERS ==================================================== To deploy to other developers: 1. Run SYNC-MANAGER.bat 2. Choose option 6 (Create Package) 3. Send the package folder to developers 4. They run INSTALL.bat ==================================================== MANUAL COMMANDS ==================================================== Start sync manually: wscript "E:\timesheet\timesheet_new\hidden-launcher.vbs" Stop all sync: taskkill /F /IM powershell.exe taskkill /F /IM wscript.exe Check if running: tasklist | findstr powershell ==================================================== SUPPORT ==================================================== If nothing works: 1. Make sure developer setup was completed 2. Check firewall/antivirus settings 3. Run as Administrator 4. Check server connectivity The key file that needs to exist: %LOCALAPPDATA%\ActivityWatchSync\sync.ps1 With correct: - DEVELOPER_NAME - API_TOKEN (not placeholder!) - SERVER_URL ====================================================