How to schedule a Cron Job to run a script on Ubuntu 16.04

How to schedule a Cron Job to run a script on Ubuntu 16.04

LinuxHelp

6 лет назад

256,170 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Anon0nline
Anon0nline - 17.08.2023 07:32

Additionally, you don't have to use "/bin/sh" as you can also use "sh" or "bash" or even "./" for most systems (including Debian/Ubuntu based systems).
For sudo commands, however, it's best to instead place those jobs in the root crontab list (update, upgrade, updatedb, etc).

Ответить
sandeep kunisetti
sandeep kunisetti - 08.07.2023 13:24

thanks man

Ответить
Mr. Charith Siriwardena
Mr. Charith Siriwardena - 23.06.2023 08:38

Perfect teaching and great presentation skills.

Ответить
F r a n
F r a n - 14.03.2023 23:56

thank you very much!

Ответить
J B
J B - 07.02.2023 17:03

thank you

Ответить
Señor Viglione
Señor Viglione - 29.01.2023 18:21

Thanks man!

Ответить
igor
igor - 12.11.2022 01:33

Thank you, sir

Ответить
Mohd Danish
Mohd Danish - 11.11.2022 09:51

not working for me dont no why , i am in /home/ubuntu directory then i am writing this command inside editor "39 11 * * * echo "this is a test" > /home/ubuntu/testfile.txt" but it is not executing i dont know why

Ответить
Mohd Danish
Mohd Danish - 11.11.2022 09:48

dont know why its not working
watched 4-5 tutorials still not working

Ответить
Dinakar B
Dinakar B - 25.10.2022 17:28

I can not execute the same file

Ответить
Watson
Watson - 27.08.2022 11:50

Nice explanation

Ответить
Karthik Yakateela
Karthik Yakateela - 24.08.2022 14:34

how to run a script using cronjob in kubernetes.....some one help me

Ответить
puli venkatesh
puli venkatesh - 11.07.2022 13:26

why we need to place /bin/sh
could u pls explain about this

Ответить
Dilip Verma
Dilip Verma - 02.07.2022 12:20

Hello sir,How can configure crontab to run a script
Second saturday will be execute at 5 AM
and other all saturday will be execute at 5 PM

Please help me sir

Thanks in advance

Ответить
BuLL fitneSS
BuLL fitneSS - 10.03.2022 13:05

How to comment a cron job?

Ответить
Zotti_ DasUrviech736
Zotti_ DasUrviech736 - 07.01.2022 18:33

Thanks for your help :D
Regards from Germany !

Ответить
Harshada Raut
Harshada Raut - 29.12.2021 11:14

If I need to schedule script for 4 am daily is this expression correct- 00 04 * * *

Ответить
Channe 404
Channe 404 - 03.12.2021 19:16

Sir when we turn off the system with and boot again before the job scaduled time (IST) will it still work or be removed form the list?

Ответить
Rakesh Mali
Rakesh Mali - 14.09.2021 17:00

I'm so new to linux world.
Should'nt #!/bin/bash this line be added to top at the script?

Ответить
Only Netflix
Only Netflix - 16.08.2021 16:27

i trying to run script for to open one tmux session. in this session i opening web page with browsh (browser with java libraries). Crontab open only session but don't session with browsh. Ideas?

Ответить
Only Netflix
Only Netflix - 29.07.2021 10:51

hi,
still does not execute the file in crontab, only manually.

Ответить
President Ravi
President Ravi - 01.07.2021 21:34

Very helpful LinuxHelp, Could we make a reboot ubuntu system to set cron job?

Ответить
Balamurugan S
Balamurugan S - 23.06.2021 14:32

What could be the reason if crontab is not even generating file.txt?

Ответить
navincha kitchen
navincha kitchen - 02.06.2021 14:39

How can I trigger a notification when a job/process ends? in linux

Ответить
Rahul Kumar
Rahul Kumar - 10.04.2021 17:37

Superb tutorial brother....amazed to see this..solved my all problem

Ответить
pravat kumar behera
pravat kumar behera - 22.03.2021 22:12

If the time format is 10h21mint10sec then ..???

Ответить
Mounir Benhalima
Mounir Benhalima - 03.03.2021 13:07

THANK YOU SO MUCH !

Ответить
H V
H V - 21.02.2021 07:26

Good job.. Just to check Hour should not be from 0-23?

Ответить
Clint McWilliams
Clint McWilliams - 06.02.2021 18:35

Simple and to the point, thanks!

Ответить
David Ibrahim
David Ibrahim - 28.01.2021 15:21

Great video. Would this be the same for running a cron job for a root user on a Debian 9 Stretch Linux Edition?

Ответить
StejoThePisto
StejoThePisto - 20.01.2021 23:22

It doesnt run for me :/

Ответить
Chan
Chan - 20.11.2020 04:00

bro docs were confusing for us, u made it worseeeeeeeeeeeeeeeeeee

Ответить
Enrico Nello
Enrico Nello - 13.11.2020 02:23

Thanks sir

Ответить
Zinthandar Shein
Zinthandar Shein - 01.10.2020 14:04

Thanks, it's easy to understand and really helpful for me.

Ответить
#S Souza
#S Souza - 01.10.2020 00:17

if I send "crontab -e", than return "no crontab for u54653268745". How to solver this? This is vps cloud hostinger

Ответить
Mayur Waghulde
Mayur Waghulde - 29.07.2020 08:27

How you save and Quit editor window

Ответить
Felipe P
Felipe P - 29.07.2020 02:54

For me, it was also very helpul! thanks, and regards from Chile :)

Ответить
Aritama
Aritama - 02.07.2020 09:42

the year is 2020, and it just helped me, thanks a lot man!

Ответить
uniblab2006
uniblab2006 - 23.05.2020 09:36

Excellent instructions on Cron tab setup!
Job well done!
Thank you.

Ответить
Agamurat 301
Agamurat 301 - 08.03.2020 11:13

great

Ответить
Borgy Manotoy
Borgy Manotoy - 04.02.2020 05:08

Thanks, I have a question though... what is the difference with the approach adding the script in `/etc/cron.daily`? I have a task to run a script daily.. but it does not work after I put the script in `/etc/cron.daily` and also removed the extension `.sh`. I can see the script when I run test (run-part --test ...). I am just wondering though... I will try this approach later :)

Ответить
Sarah Salah
Sarah Salah - 09.10.2019 17:21

How can I schedule a job so that each time it runs it takes an argument which can be a date and that date can be used in the script being run ?

Ответить
viju karnam
viju karnam - 06.08.2019 00:32

Hi great one

Actually I learnt the meaning of scripting,
I need to get call recording in daily basis from a server is that possible

Ответить
Chris Catino
Chris Catino - 19.07.2019 23:09

Do you make good Tiki Masala?

Ответить
unknown user
unknown user - 05.07.2019 15:26

yes it helped me.. thnks for ur vid

Ответить
Sristi Gupta
Sristi Gupta - 11.06.2019 09:40

Thank you for this video

Ответить