Hello, everyone.
And this still I'm going to show you how to schedule Chron jobs.
Linux operating systems.
We can show you a con jobs to run and execute commands and scripts at specific date and time.
In order to run an execute con jobs, we need to round Chron top comment.
Let's start with the first command, if I would like to, a few of the structure of the crown top entry.
So I'm going to type the command cat, then slash DGC slash crown chap and had enter.
As you can see here, he is the structure of the crown type entry.
You can see here we have the first field.
We have the minutes.
The second one hours.
Third the day of the month.
Then we have the month.
The fourth one.
And the last one is the day of the week.
Now, if I would like to view the current top for the current user right now, use the route.
So I'm going to tap crown.
Tap, dash.
Well, in order to view the current tap for the current, use it so far, we don't have any contact
for the user route.
If I would like to fuel the current tap for another user, for example, Krahn Tap.
I would like to view as a current tap for the user student.
Then here's student dash.
So Chron tap dash you then the name of the user.
Damed action.
As you can see here, there is no chron tap for student.
If I would like to edit the current tab for the current user run tab, then dash it hit, enter is going
to open.
Text that or edit your debt, I have to add the contact there on this question and go back if I would
like to.
Edit the content for user, for example, stood in Chron Chap, then same thing.
He does show you this is what the user Deyn student.
Then dash e I hit enter and it's going to being an editor and I can add my crohn chops over there.
Let's do two examples.
The first example I would like to do which with Route User.
So I would like to run every two minutes to update the timestamp of the slash ATC slash bass, the best
WD five.
So before I'm going to do anything, I'm going to show the structure of the current TAB entry.
So I'm going to tie this cat, slash EDC, slash crohn tap enter.
So right now I have what I have the structure now of the crunch engine.
So the question is, run every two minutes to update the timestamp of the.
Defy what the slash DC slash best ability.
So in this case, what the command any to use in order to update the timestamp, the touch comment.
So touch wisht touch.
So I need this bath in order to add it with the crown top before I'm going to open an editor in order
to add the current tab for this is my way.
How I do it, I usually write it here.
I copy it.
Then I pasted over there.
So.
Let's read the question again.
Run every two minutes.
So we're going to start with the first field here.
So every two minutes or start slashed to be good.
We're going to use the slash because it's every two minutes.
And there is nothing about the hour.
So I'm going to leave it.
Did the default value, which is the start space and I need to have space between those between the
different digits or the second.
Also the second digit then space.
We don't have anything for the day of the month.
So then I'm going to leave the default star month.
I don't have anything for the month.
And the question in space.
Then also, I don't have anything the day of the week, so I'm going to try stuff.
So every two minutes or star slash two and I don't have anything.
Space start, no hours, no day of the month, no math, no idea of the week then after that.
Yes.
And I'm going to copy.
This year.
The bath of the Dutch command, because we need to use that in order to update the timestamp of what
space defiled.
Slash ATC, slash past W.D..
So as we can see here, this is the current job that we need to add and duck, and it takes a detour
or and.
And and the current top for this current user.
So I'm going to see if Kobe could be this one first.
I'm going to do it this year.
And I'm linked to the to the editor of this.
I'm going to tap the crown tap dash e because I want to do it with the current user.
Wrote down a hit enter.
As you can see here, just is that exterior, it takes a bit to read.
Now, I have to add, I then I'm going to paste it.
Then I'm going to save the file, it's enter right now and installed.
Perfect.
So now if I would like to view the current tab for this current user, so I'm going to tap current tab
Dashiell hit enter.
As we can see here, we have a new cron job and Kuratov for this current user.
Now, the next question, I'm going to show the structure of their current tab entries or the Crown
tab now is the next question.
If I would like to run.
Every day on the midnight that deletes all the text files that t x, t, the T X, T fives under the
slash home slash student.
So how I'm going to do that.
And also, I want to do it.
For what?
For the user.
Student, not for this user.
I can't do it through here.
Or I can go to the to the user, stand with them.
But I will do it from here.
So now the the question of your run every day.
So if we're out every day on midnight.
So there is nothing for the minute.
We going to if it's in the midnight, so the midnight will be zero and our will be zero.
So we'll be zero zero because it's a midnight.
Then there is nothing about the day of the month.
So I'm going to leave it devilled star.
And there is nothing about the month star.
Then there is nothing.
Also about the day of the week.
So I'm going to start here.
Then the next, think what they want to do.
I want to know what is the bath of dad remove comment.
So there bath is you is the user slash Ben, then slash r m.
And also I'm going to add a recursive and also the force here with it.
Space because I would like to remove and delete all the T 60 files.
And under this, under the the home directory for the for the user student.
As you can see here.
So slash home slash student.
Let's review the current job here.
So I run every day.
Midnight saw the minute since it's midnight, so the minute would be zero and I will be zero.
Day of the month will leave its star and the month is start.
And there is nothing that we need to either.
And the day of the week start also.
Then we need to add the bath of the command.
So slash use our then slash bean slash r m.
This is the command and I'm going also to add dad option dash r.
And if I'm going to copy this.
Kobe.
And also, I'm going to delete it just to make sure that we have the right comment.
Perfect.
We have direct command here and the bath water.
All right.
Now, ever since I'm going to do it for the user straight into it, I'm going to do.
I'm going to type on top and dash you student then dash e because I would like to add Disgruntle or
the crunch up.
To the users stood hit, enter.
And I'm going to test the current job over here and I'm going to save the five hit enter.
Now I'm going to double check that they do have the Chron tab for the user student dash l.
It entered, as we can see here, we have the cron job for the user.
Student who would like to get more information about about the command Dacron tab.
We can go to the Manbij and we can get more details.
And also the options that we can use with the on tap.
That's conclude our session.
Thank you.
And see you on the next lesson.