Comments on: Crontab in Linux with 20 Useful Examples to Schedule Jobs https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/ How to guide for System Administrator's and Developers Wed, 31 Aug 2022 06:47:32 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Rahul https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-64805 Wed, 31 Aug 2022 06:47:32 +0000 https://tecadmin.net/?p=650#comment-64805 Thanks Adhilsom, I have corrected it.

]]>
By: Adhilsom https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-64804 Wed, 31 Aug 2022 06:14:20 +0000 https://tecadmin.net/?p=650#comment-64804 Thanks for article here, buta

This is the correct:
@weekly timestamp is similar to “0 0 * * sun“

For Linux the first day is SUNDAY when we have @weekly in crontab.

]]>
By: SandeepD https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-63374 Thu, 16 Sep 2021 15:37:43 +0000 https://tecadmin.net/?p=650#comment-63374 Hi Rahul
Nice artical, Thanks a lot

Personal request : Can you provide any guidelines regarding how to write cron job scripts for various occasions like
payment remainders, subscription remainder, birthday wishes, backup activities and block premium users if they fail to follow the rules etc

Thanks

]]>
By: Kevin https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-62785 Tue, 13 Apr 2021 02:40:05 +0000 https://tecadmin.net/?p=650#comment-62785 Great article Rahul. Very nicely explained. I have scheduled a python script to start at 1800 hours everyday which runs in a continuous loop until stopped. Now i want to schedule a stop of the script at 0600 hours everyday. How can i do that using corntab,
What i tried
0 06 * * * killall -9 myscript.py

and also
0 6 * * * /home/pi/ killall -9 myscript.py

also
0 6 * * * killall -9 /home/pi/myscript.py
However, it is not working. Please help.
Thanks

]]>
By: Eddy https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-62766 Tue, 06 Apr 2021 09:27:53 +0000 https://tecadmin.net/?p=650#comment-62766 Hello, I am on SUSE Linux Enterprise Server 12 SP4 or 15 SP2 and when I try to cron script every specific sunday of the month, cron launch my script every sunday !
I tried that…
00 18 8-14 * 0 if [ `/opt/Oxya/TestFDM.sh` = “0” ] ; then /etc/rc.d/sybase stop && /sbin/shutdown -r now ; fi
… or that…
00 18 8,9,10,11,12,13,14 * 0 if [ `/opt/Oxya/TestFDM.sh` = “0” ] ; then /etc/rc.d/sybase stop && /sbin/shutdown -r now ; fi
… same result ! It didn’t take care of day number ! Had you already this issue ?
Thansks !

]]>
By: Azeem https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-61791 Tue, 23 Mar 2021 09:35:43 +0000 https://tecadmin.net/?p=650#comment-61791 run it like below.
echo “php /kunden/homepages/26/d864146585/htdocs/v-sendy/autoresponders.php” > /script/script.sh
while the php must be installed on your linux system, schedule your cron as below.

* * * * * /script/script.sh

]]>
By: Rahul https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-61658 Mon, 22 Mar 2021 04:36:24 +0000 https://tecadmin.net/?p=650#comment-61658 This cron is scheduled to run on every minute. Are you getting any error?

]]>
By: joe https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-61520 Sat, 20 Mar 2021 00:05:10 +0000 https://tecadmin.net/?p=650#comment-61520 I have tries to run cron job as below, but it is not running as wanted.

* * * * * php /kunden/homepages/26/d864146585/htdocs/v-sendy/autoresponders.php

May i know what happen? Thank you.

]]>
By: Rahul https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-61387 Tue, 16 Mar 2021 03:58:41 +0000 https://tecadmin.net/?p=650#comment-61387 Hi Jitin,

Try below crontab format. Change months according to your requirements:

59 23 28-31 jan,apr,jul,oct * [ “$(date +%d -d tomorrow)” = “01” ] && /root/script.sh

]]>
By: Jitin https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/#comment-60636 Wed, 10 Mar 2021 17:03:16 +0000 https://tecadmin.net/?p=650#comment-60636 What is the Corn to run a job “last day of the every month”
I tried: (30 23 28-31 * * ) but it is running for 28th 29th 30th 31st of every month
But I need last day of every month ?? March has 31st April has 30th and Feb has 28th ??

]]>