Episode: 507 Title: HPR0507: Cron with Ken Fallon Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0507/hpr0507.mp3 Transcribed: 2025-10-07 21:59:59 --- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . that the top of the file to email that to a certain location. But what most people tend to do is to redirect the output of their files to another location. So you might redirect that using the grater than symbols. So if we edit the file again and we type, we go to the end of the line where it is as five asterisks for such home using him and at the end, after home we put in a space, the grater then slash home slash your username and slash hello.output. And if you save that file and exit after a minute, that file called hello.output will appear in your home directory. So essentially you have now a working cron file. If we edit that file again and at the end of that file where we have hello.output, we put in the grater than sign. Oh sorry, we put it instead of the grater than sign. We put in the, so we have the command greater than slash home username hello.output and then we have the number two and we have the grater than sign and we have the dollar one. And what that does is it tells cron to redirect any output to the same place that we're putting the output from first place. It's a lot simpler when you see that and you'll see examples of this in the show notes. But let's go and talk a little bit now about what the fields are that the tabs are. And the tabs that we have at the first one is the minute. And this controls the minutes of the hour that the command will run. And this is between zero and 59. And the next field is the hour field. And this controls what our command will run and it's specified on 24 hour clock. And it starts at zero and it runs to 23 where zero is midnight. So you're kind of guessing that the next one is the day of the month. And the day of the month it's going to run on. So if you have 19 in there, it will be the 19 to run on regardless of what day of the week it is. And then the next field is the day of the week. So if that specifies the day it'll run. So zero to seven is allowed the most systems where zero is Sunday and seven is also Sunday. And then we have the command itself that's going to run. So given you some examples. So if we had asterisk so zero one asterisk asterisk asterisk asterisk and that command will run one minute past the hour every hour. If we had 17 space eight asterisk asterisk asterisk that command would run daily at 17 minutes past eight every morning. If we have 17 20 space asterisk asterisk asterisk that command would run at eight PM while 17 minutes past eight PM. If we had for instance zero zero four asterisk asterisk zero that command would run at four PM every Sunday. Or if we had asterisk four asterisk asterisk some SUN that would also run a four every Sunday. Now I'm reading these from one of the cron manuals. And that is pretty much it for cron. Very very simple command. Does one thing does it well. Hope you find that interesting. I will talk to you again on how to publish a radio. Now last month I recommended a podcast called Spudjo and it was fantastic to get feedback both from chess. I would like to thank chess for his kind feedback on mashed potter and it also liked to like Brendan for his feedback on recommending his show Spudjo and especially like to thank him for putting a special show together show 400 with all the recommendations that I had in my last show. So it's well worth to listen I've listened to it about 10 times already. Now today I would like to continue on with recommending other podcasts here and recommending a podcast by our very good friend Dan Lynch of the you might know him as one of the outlaws and Linux outlaws and he has a show called Rattle Radio which is absolutely brilliant. This show reminds me of a show that I used to listen to when I was going to college and one of the pirate stations and there's this old crudger not to say that Dan is an old crudger but he used to play the weirdest stuff going from one thing to the next thing and you know just absolutely fantastic to get a nice good mix and Dan's model over there is there's only two types of music there's music legs and the music he doesn't like so I recommend that as this month show to listen to go ahead and definitely subscribe to Rattle Radio if you can and he's actually putting on a show in Liverpool next year which I would very very very very tempted to try well next year is actually this year try and get over to I doubt I will be able to but yeah all the success with that anyway that's this month's recommendation and just to remind you that you can also pick up a mic and send in a show to HPR we are a community radio station supported by you the listener and ladies and gentlemen thank you for listening to the radio HPR is sponsored by Carol.net so head on over to C-A-R-O dot E-C for all of her team