WEBVTT

00:08.620 --> 00:14.640
Hello will come back in this lesson we're going to learn how to share grueling tasks with cron jobs.

00:14.760 --> 00:17.120
OK so what is wrong job.

00:17.410 --> 00:24.190
It is in command line utility which is used to set up your tasks to be run at a particular date and

00:24.190 --> 00:25.120
time.

00:25.150 --> 00:31.270
So what are the benefits the benefits are like those you do need to go to a server and exactly the same

00:31.280 --> 00:36.250
common or performing some tasks you just need to set those Come on.

00:36.250 --> 00:37.630
Here with dustier to learn.

00:37.630 --> 00:44.710
And those comments will be executed at a particular time like if you want to back up your important

00:44.710 --> 00:46.190
files and folders.

00:46.240 --> 00:52.610
You can set up that task to be run every day or in a month or in a week.

00:53.290 --> 00:58.810
Or you can also set up the task to scanning was asking for viruses or that kind of thing.

00:59.020 --> 01:06.280
So you can set up the cron job to secure your system by scanning it at regular interval.

01:06.430 --> 01:07.130
OK.

01:07.180 --> 01:14.350
And interval of a day or so of before actually performing the practical with cron jobs.

01:14.350 --> 01:15.700
Let's see how it works.

01:15.700 --> 01:17.220
So there is a syntax.

01:17.470 --> 01:24.730
There are five stars in the cron job searching and here at the right side you need to set up the score

01:24.730 --> 01:26.620
come on that you want to execute.

01:26.800 --> 01:31.520
Let's see what each stat represents the first three presidents minutes.

01:31.690 --> 01:36.560
You can set the number of minute after which you want your task to be executed.

01:36.750 --> 01:37.210
OK.

01:37.330 --> 01:40.620
You can't set the minutes from 0 to 59.

01:40.720 --> 01:41.130
OK.

01:41.230 --> 01:44.220
Because a single hour in 16 minutes.

01:44.320 --> 01:47.360
So here you can set from zero to 59.

01:47.410 --> 01:49.500
The next step represents our.

01:49.540 --> 01:52.440
So our day consists of going to four hour.

01:52.560 --> 01:53.020
OK.

01:53.020 --> 01:55.920
Our clock is consisting of 24 hours.

01:56.050 --> 02:01.360
So you can sit here numbers from zero to 23 zero minutes.

02:01.460 --> 02:05.410
Well AM it walks like a 24 hour clock.

02:05.550 --> 02:13.990
So at which time you want to execute your task you can set up that number here according to your needs.

02:14.190 --> 02:14.480
OK.

02:14.500 --> 02:22.180
Suppose you want exactly what you are task or come on after 12:30 or so how you need to said that you

02:22.180 --> 02:25.410
need to send the hour star.

02:25.770 --> 02:28.350
And the minute star do 30.

02:28.360 --> 02:34.900
So what they were sent here and they I that will get executed at 12:30 p.m. OK.

02:35.500 --> 02:39.110
The next presents day of month in a month.

02:39.160 --> 02:41.590
There are a maximum of 31 days.

02:41.590 --> 02:47.380
So you can set the number from 1 to 31 and what they were number is said here.

02:47.730 --> 02:54.710
That combined will get executed and that the donkey and the next represents man.

02:54.850 --> 02:56.360
So there are amounts.

02:56.400 --> 02:58.870
So when you consider the number from one.

02:58.960 --> 03:01.650
Well OK one wins in January.

03:01.800 --> 03:02.270
OK.

03:02.440 --> 03:09.180
So you can see the numbers if you want to sit or execute your task that particular month.

03:09.910 --> 03:12.430
And the last one is day of week.

03:12.610 --> 03:12.940
OK.

03:12.980 --> 03:19.890
So zero and seven means Sunday and one means Monday or Tuesday and so on.

03:20.170 --> 03:25.800
So if you want good around your task that particular day of the week then you can't sit there calling

03:25.870 --> 03:27.740
to hear that number.

03:27.880 --> 03:31.490
So there is one thing that I want to mention here.

03:31.710 --> 03:34.750
Venu said the starter.

03:34.820 --> 03:41.860
Suppose you said the minutes to start not from zero to 15 and would set it to start as it did then the

03:41.860 --> 03:48.510
task order as you said here on the right side will be executed every minute of every minute.

03:48.700 --> 03:49.240
OK.

03:49.360 --> 03:55.300
The same logic is applied for every starter when you don't set it to particular day of month or month

03:55.300 --> 04:04.780
or day of recall hour that that means the task will be executed OK for every month the day of month

04:04.870 --> 04:06.280
hour and minutes.

04:06.520 --> 04:07.120
OK.

04:07.120 --> 04:09.210
So in this way These are works.

04:09.250 --> 04:17.750
So let's see practically a whole new set of grown ups who set up the con jobs are there is a common

04:17.870 --> 04:20.490
core has grown up.

04:20.740 --> 04:21.310
OK.

04:21.490 --> 04:26.820
And Nicholas pro-white hyphen e ave provide hope.

04:27.010 --> 04:31.710
Then it will start you are across jobs in the mall.

04:31.960 --> 04:37.130
When if you want to or list of jobs then type hyphen.

04:37.380 --> 04:41.330
And if you want to remove any cron job then type Ifan are OK.

04:41.330 --> 04:43.930
This way you can use the switches.

04:44.260 --> 04:45.130
OK.

04:45.130 --> 04:50.430
There are a few commands like the start restart or stop the cron jobs.

04:50.500 --> 04:59.070
So if you want to start or see the status then just type service cron status.

04:59.440 --> 05:03.170
And here you can see the cross-overs is running in this way.

05:03.190 --> 05:11.670
You can see the status or static college or just type here.

05:11.740 --> 05:15.180
Select deleter and attender.

05:15.180 --> 05:21.780
So when you type or grandpap hyphen at first time then you will see the output like this.

05:21.900 --> 05:22.640
OK.

05:22.800 --> 05:25.630
This is asking you to choose the leader forward.

05:25.650 --> 05:27.190
Oh come on Delphi.

05:27.400 --> 05:27.920
OK.

05:28.110 --> 05:35.970
So I want to select here four here because he represents the maker and number Gouri presence Nano is.

05:36.310 --> 05:39.110
So the answer is simple for some users.

05:39.150 --> 05:43.490
You can choose it according to a choice and go ahead.

05:43.650 --> 05:53.040
OK so you create a job or two should do the job just kind of crunch time for me.

05:53.330 --> 05:53.770
OK.

05:53.820 --> 06:01.920
And I want to set up the cron job for taking the back off of the EDC directory OK that we have said

06:01.920 --> 06:03.610
in the last lesson.

06:03.810 --> 06:09.680
So because the DC needs global privilege so type your pseudo cross-tab the

06:13.840 --> 06:18.850
OK so let's do that job here.

06:18.910 --> 06:23.380
So I want who are the bad guys every minute.

06:23.380 --> 06:25.660
So I'm going to set here start.

06:28.720 --> 06:31.820
So let's do the five stars here.

06:32.630 --> 06:35.380
And our job is to get the back up.

06:35.400 --> 06:45.540
So provide the command are we get them here provide the filename I want it who did at some point on

06:45.780 --> 06:51.620
our said and here the that you want to back up here.

06:51.630 --> 06:54.710
Pro-white I fancy Zed.

06:54.910 --> 06:55.650
Yes.

06:55.900 --> 06:57.090
OK.

06:57.480 --> 06:58.880
And yes.

06:59.130 --> 07:00.350
Right now.

07:00.950 --> 07:01.760
OK.

07:01.810 --> 07:03.680
Let's move inside group three.

07:03.820 --> 07:04.230
OK.

07:04.310 --> 07:09.000
Here there is no file present with a double dot dot dot.

07:09.040 --> 07:10.440
So that for one minute.

07:10.450 --> 07:12.020
And let's see what happens.

07:18.660 --> 07:26.010
See again hogi here you can see after one minute exampled Akbar God did their files get created in this

07:26.010 --> 07:32.050
way you can set up Dikran jobs who take the back of all you can't perform any task that you want to

07:32.060 --> 07:33.700
get.

07:33.720 --> 07:38.350
This is the one way for setting up a cron job.

07:38.460 --> 07:40.290
I want to set it for

07:43.690 --> 07:45.340
let's see here.

07:45.340 --> 07:51.000
First of all let's just get inside through and delete this file.

07:51.380 --> 07:58.680
Pseudo r.m the blue dot dot dot.

08:00.770 --> 08:04.210
And I've got this right now the current time.

08:04.330 --> 08:04.980
OK.

08:05.140 --> 08:07.940
Here you can see the current Burmese of 13.

08:08.130 --> 08:08.570
OK.

08:08.590 --> 08:12.900
Forking means it's 14:00 Woopie about 11 minutes.

08:13.150 --> 08:18.530
So let's say the job here for us supports 14 billion.

08:18.660 --> 08:19.400
OK.

08:19.420 --> 08:23.430
So let's see how you set it up by changing our fee.

08:23.680 --> 08:25.950
OK so yesterday on to I'll be

08:30.450 --> 08:40.600
let's get insert more OK remove this command line and I want to know what task after 30 minutes after

08:41.970 --> 08:43.410
mine 30 minutes.

08:43.450 --> 08:44.300
OK.

08:45.100 --> 08:47.360
I'll write it down.

08:48.530 --> 08:49.770
OK.

08:50.390 --> 08:53.340
Now we need to check this after one minute.

08:53.340 --> 08:55.950
Let's see here what is your time.

08:58.440 --> 08:58.870
OK.

08:58.900 --> 09:01.110
These 14 13.

09:01.810 --> 09:03.090
OK let's get it do

09:06.020 --> 09:21.510
let's say who reads all the writing don't forget there is no files in this directory.

09:21.720 --> 09:23.110
Let's see the date.

09:23.450 --> 09:25.660
So it's 40 30.

09:25.700 --> 09:28.010
So let's see what happens.

09:28.650 --> 09:29.240
Alice

09:36.540 --> 09:38.150
bouquet now of her.

09:38.160 --> 09:46.410
Oh one minute you need to check the status of these tasks in order.

09:46.730 --> 09:54.180
We have set it to 15 minutes at 2pm and 15 minutes and then see your desk.

09:54.350 --> 09:55.130
OK it's done.

09:55.130 --> 09:55.940
And let's see.

09:55.970 --> 10:00.970
And here you can see in the root directory example dot dot dot does help file is created OK.

10:00.980 --> 10:07.180
Of this 14 hour and 15 minutes means 14 minutes or time OK.

10:07.190 --> 10:07.930
14 hours.

10:07.930 --> 10:12.420
It's not exactly around to say You stupid 15 minutes.

10:12.500 --> 10:13.580
Get in this way.

10:13.670 --> 10:20.420
You can share task on the basis of one Veeck day of the point.

10:20.510 --> 10:21.150
OK.

10:21.410 --> 10:24.410
So in this production those can be used.

10:25.010 --> 10:28.910
So there is another way of settling for us.

10:28.940 --> 10:30.050
Let's get inside

10:32.390 --> 10:36.370
D.C. and here you can see here.

10:36.440 --> 10:38.610
These are the directory's corndog.

10:38.760 --> 10:44.210
OK where you can go right on in these directories you can write your own script.

10:44.320 --> 10:44.850
OK.

10:45.050 --> 10:52.040
And you can run those clip on a monthly basis or hourly basis or daily basis you can you just need to

10:52.040 --> 10:58.370
write down your own script and so that script in this directory and that scoop will really get executed

10:58.490 --> 11:05.220
on the basis of where you were receiving minutes on the daily hourly order basis.

11:05.370 --> 11:05.840
OK.

11:06.080 --> 11:07.840
This is a robot.

11:08.410 --> 11:17.060
And the last way we learn is important and very useful in this way you can set up Dikran jobs and lower

11:17.060 --> 11:22.810
down the burden on your mind to perform specific tasks again and again.
