cron jobs and output and --quiet

  • Yuni Trunker
    Yuni Trunker

    I use a cron job to record 1 hour blocks of a stream.

    Since cron doesn't like the output from SR, you have to use -quiet…. BUT… I would like to capture that output to a file/log.

    Any way to pipe that to a file? ? I tried >> metatag.log and that won't run with cron even with -quiet.

    Any ideas??

  • VitaminJ

    The solution here is probably stream redirection of both stderr and stdout like streamripper >> /www/logs/crontab-streamripper.log 2>&1.

    Another issue is that cron doesn't provide an environment for commands run from there. You put '>> metatag.log', but I would bet that the pwd inside cron is not what you think it is. Try using the full path '/home/username/metadata.log'.