Crontab Tutorial - Tips & Shortcuts

Crontab Tutorial - Tips & Shortcuts

*/5 * * * * /command

The above is an example of a command that runs every 5 minutes.
Normally instead if the "*/5" you'd have to type
"5,10,15,20,25,30,35,40,45,50,55" etc...

You can use it to run a program every 5 days, 5 months 5 years etc...


Crontab run one a day at a certain time

[code:1:7a3bd32dfa]0 1 * * * /home/backupguy/databackup.sh[/code:1:7a3bd32dfa]

This will run the script every day at 1AM

[quote:7a3bd32dfa]min hour day/month month day/week[/quote:7a3bd32dfa]


More Crontab examples

[quote:100a5ac681]min hour day/month month day/week Execution time
30 0 1 1,6,12 * -- 00:30 Hrs on 1st of Jan, June & Dec.

:
0 20 * 10 1-5 --8.00 PM every weekday (Mon-Fri) only in Oct.

:
0 0 1,10,15 * * -- midnight on 1st ,10th & 15th of month

:
5,10 0 10 * 1 -- At 12.05,12.10 every Monday & on 10th of every month[/quote:100a5ac681]



Tags:

crontab, tutorial, shortcutscrontab, shortcuts, quot, etc, bd, dfa, backupguy, databackup, sh, min, examples, ac, execution, hrs, dec, pm, weekday, fri, oct,

Latest Articles

  • EFI PXE grub2 Howto guide for Linux EFI PXE Booting on Debian, Mint, Ubuntu, RHEL
  • Aruba/HP/Dell IAP Wireless Controller Common Default Passwords
  • Debian, Mint Ubuntu how to remove package and associated config files
  • Linux Grub not booting the intended kernel solution in Debian, Mint, Ubuntu how to specify which kernel to boot by default
  • QEMU KVM Keyboard Problems Not Working Right Repeating Characters, Ctrl+C Copy and Paste not working right when using PS2 mouse in guests Solution
  • Linux how to compile binary with static sharedobjects embedded instead of dynamic to use on multi-distributions and avoid glibc compatiblity issues
  • /bin/sh: msgfmt: not found error solution on Linux Compilation Ubuntu Debian Mint Centos
  • Mikrotik RouterOS CHR/ISO Basic and Quick Setup Howto Guide
  • qemu 4 compilation options
  • CentOS 7 8 PXEBoot Netinstall Not Working Solution "Pane is dead "new value non-exisetnt xfs filesystem is not valid as a default fs type"
  • CentOS 6 EOL yum repo won't work Error: Cannot find a valid baseurl for repo: base Solution
  • CentOS 7 8 How To Disable SELinux
  • Wordpress How To Add Featured Image To Post in Hueman Theme
  • kdenlive full reset how to erase all config files
  • CentOS 7 8 yum error Trying other mirror. To address this issue please refer to the below wiki article
  • Microsoft Teams Linux - Calendar Doesn't Work Missed Meetings!
  • Scanner not working in Linux Ubuntu Fedora Mint Debian over the network? Use sane-airscan!
  • How To Boot, Install and Run Windows 2000 on QEMU-KVM
  • bash cannot execute permission denied
  • Huion and Wacom Tablets How To Install in Linux Mint / Ubuntu and make the stylus work properly