collect_tweets.sh
306 Bytes
#!/bin/bash
LOCK_NAME=running_lock
LOG_FILE=log-$(date +%Y%m%d).txt
if [ -a "$LOCK_NAME" ]
then
echo "Monitor process is already running, skipping this run.";
else
touch $LOCK_NAME;
python monitor_users.py user_list.txt twittertokens.txt trendminer:tweets >> logs/$LOG_FILE;
rm $LOCK_NAME;
fi