#!/bin/bash

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

if [ `find ~/projets/schedule-tweet/tweet-to-schedule.txt -size +0` ];then
        tw=`head -n1 ~/projets/schedule-tweet/tweet-to-schedule.txt`
        sed -si 1d ~/projets/schedule-tweet/tweet-to-schedule.txt
        echo $tw >> ~/projets/schedule-tweet/tweeted.txt
        t update "$tw"
fi
*/8 17-23 * * * /home/vrh/projets/schedule-tweet/tweet-scheduler.sh