← back to Dear Bubbe Nextjs

scripts/twitter-auto-post.sh

20 lines

#!/bin/bash

# Social Media Auto-Poster for Dear Bubbe
# Posts interesting Bubbe conversations to Twitter/X.com and Bluesky
# Runs every 4 hours via cron

LOG_FILE="/root/Projects/dear-bubbe-nextjs/logs/social-poster.log"
SCRIPT_PATH="/root/Projects/dear-bubbe-nextjs/lib/social-autoposter.js"

# Create log directory if it doesn't exist
mkdir -p /root/Projects/dear-bubbe-nextjs/logs

echo "$(date): Starting social media auto-post" >> $LOG_FILE

# Run the unified auto-poster (posts to both Twitter and Bluesky)
cd /root/Projects/dear-bubbe-nextjs
/usr/bin/node $SCRIPT_PATH >> $LOG_FILE 2>&1

echo "$(date): Social media auto-post completed" >> $LOG_FILE
echo "---" >> $LOG_FILE