Cara Balas WA Otomatis 24 Jam Non-Stop

Tutorial setup auto reply WhatsApp 24/7 tanpa henti. Server-based, always online, anti offline. Panduan lengkap!

Cara Balas WA Otomatis 24 Jam Non-Stop
Cara Balas WA Otomatis 24 Jam Non-Stop

Customer chat jam 2 malam, siapa yang balas?

Dengan setup yang benar, auto reply bisa jalan 24/7 tanpa henti. Tidak perlu begadang!


Kenapa Butuh 24 Jam?

📊 FAKTA:
- 35% chat masuk di luar jam kerja
- Customer expect response < 5 menit
- Kompetitor yang fast response menang
- Late reply = Lost sales

SOLUSI:
Auto reply 24/7!

Metode Auto Reply 24 Jam

Metode 1: WA Business Away Message (Basic)

✅ Gratis
❌ Fitur terbatas
❌ Hanya 1 pesan

SETUP:
1. WA Business → Settings → Business Tools
2. Away Message → ON
3. Set schedule: "Always send"
4. Tulis pesan away

COCOK UNTUK:
Informasi basic saat offline
Bukan full automation
✅ Easy setup
✅ No maintenance
✅ 24/7 guaranteed
💰 Berbayar

SETUP:
1. Daftar platform (Balaswa, dll)
2. Connect WhatsApp (scan QR)
3. Setup auto reply rules
4. Done! Jalan otomatis 24/7

COCOK UNTUK:
UMKM yang mau simple
Tidak mau ribet teknis

Metode 3: VPS/Cloud Server (Advanced)

✅ Full control
✅ Customizable
💰 Biaya server
🔧 Butuh skill teknis

SETUP:
1. Sewa VPS (DigitalOcean, Vultr, dll)
2. Install Node.js + library
3. Deploy bot code
4. Setup process manager (PM2)
5. Monitor & maintain

COCOK UNTUK:
Developer
Bisnis dengan kebutuhan custom
Volume tinggi

Setup Server 24/7 (Technical)

1. Sewa VPS:

REKOMENDASI MURAH:
- Vultr: $5/month (1GB RAM)
- DigitalOcean: $6/month
- Contabo: €4/month
- Netcup: €3/month

SPESIFIKASI MINIMAL:
- 1 vCPU
- 1GB RAM
- 20GB SSD
- Ubuntu 22.04

2. Setup Server:

bash

# Update system
sudo apt update && sudo apt upgrade -y

# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Install PM2 (process manager)
sudo npm install -g pm2

# Clone bot code
git clone https://github.com/your-repo/wa-bot.git
cd wa-bot
npm install

3. Run dengan PM2:

bash

# Start bot
pm2 start index.js --name "wa-bot"

# Auto-start saat server reboot
pm2 startup
pm2 save

# Monitor
pm2 status
pm2 logs wa-bot

4. Keep Alive Script:

javascript

// health-check.js
const axios = require('axios');

async function healthCheck() {
    try {
        const response = await axios.get('http://localhost:3000/health');
        console.log('Bot healthy:', response.data);
    } catch (error) {
        console.error('Bot down! Restarting...');
        // Trigger restart via PM2 API or webhook
    }
}

// Check setiap 5 menit
setInterval(healthCheck, 5 * 60 * 1000);

Monitoring & Alerts

Setup Uptime Monitoring:

TOOLS GRATIS:
- UptimeRobot (50 monitors free)
- Freshping (50 monitors free)
- Cronitor (limited free)

SETUP:
1. Buat endpoint /health di bot
2. Daftarkan URL di monitoring tool
3. Set alert ke email/Telegram
4. Dapat notif jika bot down

Health Endpoint:

javascript

const express = require('express');
const app = express();

let lastMessageTime = Date.now();
let isConnected = false;

app.get('/health', (req, res) => {
    const status = {
        connected: isConnected,
        lastMessage: new Date(lastMessageTime).toISOString(),
        uptime: process.uptime(),
        memory: process.memoryUsage()
    };
    
    if (isConnected) {
        res.status(200).json({ status: 'healthy', ...status });
    } else {
        res.status(503).json({ status: 'unhealthy', ...status });
    }
});

app.listen(3000);

Auto-Recovery

PM2 Auto-Restart:

javascript

// ecosystem.config.js
module.exports = {
    apps: [{
        name: 'wa-bot',
        script: 'index.js',
        watch: false,
        max_memory_restart: '500M',
        restart_delay: 5000,
        max_restarts: 10,
        autorestart: true,
        exp_backoff_restart_delay: 1000
    }]
};

Watchdog Script:

bash

#!/bin/bash
# watchdog.sh - Run via cron setiap 5 menit

BOT_STATUS=$(pm2 jlist | jq '.[0].pm2_env.status')

if [ "$BOT_STATUS" != '"online"' ]; then
    echo "Bot not running, restarting..."
    pm2 restart wa-bot
    
    # Send alert
    curl -X POST "https://api.telegram.org/bot$TOKEN/sendMessage" \
        -d "chat_id=$CHAT_ID&text=⚠️ WA Bot restarted!"
fi

Cron Setup:

bash

# Edit crontab
crontab -e

# Add watchdog setiap 5 menit
*/5 * * * * /home/ubuntu/watchdog.sh >> /var/log/watchdog.log 2>&1

Tips 24/7 Reliability

1. Redundancy

Primary: VPS di Singapore
Backup: VPS di Jakarta

Jika primary down, switch ke backup.
Atau gunakan load balancer.

2. Graceful Reconnection

javascript

sock.ev.on('connection.update', async (update) => {
    const { connection, lastDisconnect } = update;
    
    if (connection === 'close') {
        const shouldReconnect = 
            lastDisconnect?.error?.output?.statusCode !== 401;
        
        if (shouldReconnect) {
            console.log('Reconnecting in 5 seconds...');
            setTimeout(() => startBot(), 5000);
        }
    }
});

3. Memory Management

javascript

// Clear old data periodically
setInterval(() => {
    // Clear conversation cache older than 24 hours
    conversations.forEach((value, key) => {
        if (Date.now() - value.lastUpdate > 24 * 60 * 60 * 1000) {
            conversations.delete(key);
        }
    });
    
    // Force garbage collection (jika pakai --expose-gc)
    if (global.gc) {
        global.gc();
    }
}, 60 * 60 * 1000); // Setiap 1 jam

Biaya 24/7 Operation

💰 ESTIMASI BULANAN:

METODE 1: WA Business
- Gratis (tapi terbatas)

METODE 2: Cloud Platform
- Rp 100k - 500k/bulan

METODE 3: Self-Hosted
- VPS: Rp 50k - 200k/bulan
- Monitoring: Gratis
- Maintenance: Waktu kamu

TOTAL SELF-HOSTED:
Rp 50k - 200k/bulan

FAQ

Apakah HP harus nyala 24 jam?

Tidak! Dengan multi-device, bot di server bisa jalan sendiri. HP cukup online sekali dalam 14 hari.

Bagaimana jika server down?

Setup monitoring + auto-restart. Dengan PM2 dan watchdog, downtime bisa diminimalkan.

Berapa uptime yang realistis?

Target 99.9% uptime = max 8.7 jam down per tahun. Achievable dengan setup yang benar.


Kesimpulan

24/7 auto reply = Never miss a customer!

Tanpa 24/7Dengan 24/7
Miss chat malamAlways responsive
Lost salesCapture semua leads
Bad impressionProfessional

Be available, even when you sleep!

Setup 24/7 Auto Reply →


Artikel Terkait