diff --git a/bot.php b/bot.php index 2070c28..dc1c477 100755 --- a/bot.php +++ b/bot.php @@ -1,34 +1,40 @@ #!/usr/bin/php . namespace itwikidelbot; // autoload classes require __DIR__ . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'autoload.php'; +use cli\Log; + // load credentials require __DIR__ . DIRECTORY_SEPARATOR . 'config.php'; // the first argument is the days to go backward $DAYS = isset( $argv[ 1 ] ) ? (int) $argv[ 1 ] : 1; // the second argument is a 'YYYY-MM-DD' date $DATE = isset( $argv[ 2 ] ) ? $argv[ 2 ] : 'now'; +Log::info( 'start' ); + $bot = Bot::createFromString( $DATE ); for( $i = 0; $i < $DAYS; $i++ ) { $bot->run()->previousDay(); } + +Log::info( 'end' );