Last active
March 27, 2023 08:47
-
-
Save adojos/f809966ed813904382602131c82db995 to your computer and use it in GitHub Desktop.
Revisions
-
adojos revised this gist
Mar 27, 2023 . 1 changed file with 13 additions and 49 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -58,55 +58,19 @@ ### Examples | Commands | Description | | :-----------------------------| ------------------------------------: | | Execute specified script twice a day at 6 AM and 6 PM daily | `0 6,18 * * * script.sh` | | Execute specified script twice daily at 5PM and 17PM | `0 5,17 * * * script.sh` | | Execute specified script every minute | `* * * * * script.sh` | | Execute specified script every every day at 00:00 | `0 0 * * * script.sh` | | Execute specified script every 5th minute | `*/5 * * * * script.sh` | | Execute specified script every day at 8 AM | `0 8 * * * script.sh` | | Execute specified script every hour at minute 0 | `0 * * * * script.sh` | | Execute specified script every Sunday at 5 PM _(Non standard! May not work with every cron)_ | `0 17 * * sun script.sh` | | Execute specified script on selected months _(Non standard! May not work with every cron)_ | `* * * jan,may,aug * script.sh` | | Execute specified script every four hours | `0 */4 * * *` | </br> -
adojos revised this gist
Mar 25, 2023 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ </br> ### Common Commands | Commands | Description | | :-----------------------------| ----------------------------------------: | | `crontab -e` | Edit crontab file, or create one if it doesn’t already exist. | -
adojos revised this gist
Mar 25, 2023 . 1 changed file with 62 additions and 40 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,98 +1,120 @@ ## CronTab Basic Commands With Examples </br> | Commands | Description | | :-----------------------------| ----------------------------------------: | | `crontab -e` | Edit crontab file, or create one if it doesn’t already exist. | | `crontab -l` | List cronjobs, display crontab file contents | | `crontab -r` | Remove your crontab file | | `crontab -u UserName -r` | Delete all crontab jobs of the named user | | `crontab -v` | Display the last time you edited your crontab file. (This option is only available on a few systems.) | | `crontab -u UserName -l` | List all crontab jobs for the named user| </br> ### Command Switches/Parameters | Commands | Description | | :-----------------------------| -----------------------------------------: | | `-u` | Specifies the user whose crontab is to be viewed or modified. If this option is not given, crontab opens the crontab of the user who ran crontab | | `-l` | Display the current crontab. | | `-r` | Remove the current crontab. | | `-e` | Edit the current crontab, using the editor specified in the environment variable | | `-i` | Same as -r, but gives the user a yes/no confirmation prompt before removing the crontab | </br> ### Time and Date Fields | Commands | Description | | :-----------------------------| -------------------------------------------: | | `minute` | Minutes, expressed as a whole number from 0-59 | | `hour` | Hour, expressed as a whole number from 0-23 | | `day of month` | Day of the month, ranging from 1-31. The asterisk indicates that task can run on any day of the month | | `month` | Month, which can range from 1-12. The asterisk indicates that task can run on any month of year | | `day of week` | Day of the week. This is represented by a number from 0-7. Zero or 7 is Sunday. 1 is Monday. 6 is Saturday | </br> ### Shorthand Keywords :point_right: *Note*: _Keywords given below are non-standard and may not run on every system._ | Commands | Description | | :-----------------------------| ------------------------------------: | | `@reboot` | Run once at startup | | `@yearly` | Run once a year (0 0 1 1 *) | | `@annually` | Same as @yearly | | `@monthly` | Run once a month (0 0 1 * *) | | `@weekly` | Run once a week (0 0 * * 0) | | `@daily` | Run once a day (0 0 * * *) | | `@midnight` | Same as @daily | | `@hourly` | Run once an hour (0 * * * *) | </br> ### Examples Execute specified script twice a day at 6 AM and 6 PM daily: ``` 0 6,18 * * * script.sh ``` Execute specified script twice daily at 5PM and 17PM: ``` 0 5,17 * * * script.sh ``` Execute specified script every minute: ``` * * * * * script.sh ``` Execute specified script every every day at 00:00: ``` 0 0 * * * script.sh ``` Execute specified script every 5th minute: ``` */5 * * * * script.sh ``` Execute specified script every day at 8 AM: ``` 0 8 * * * script.sh ``` Execute specified script every hour at minute 0: ``` 0 * * * * script.sh ``` Execute specified script every Sunday at 5 PM _(Non standard! May not work with every cron)_: ``` 0 17 * * sun script.sh ``` Execute specified script on selected months _(Non standard! May not work with every cron)_: ``` * * * jan,may,aug * script.sh ``` Execute specified script every four hours: ``` 0 */4 * * * ``` </br> ### Online Cron Job Generators [CronTab Guru](https://crontab.guru/) [Cron Expression Generator Quartz](https://www.freeformatter.com/cron-expression-generator-quartz.html) [CronTab Generator](https://crontab-generator.org/) -
adojos revised this gist
Mar 25, 2023 . 1 changed file with 92 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,98 @@ ## CronTab Essential Commands With Examples </br> | Commands | Description | | :-----------------------------| ------------------------------------------------------------------------: | | `crontab -e` | Edit crontab file, or create one if it doesn’t already exist. | | `crontab -l` | List cronjobs, display crontab file contents | | `crontab -r` | Remove your crontab file | | `crontab -u UserName -r` | Delete all crontab jobs of the named user | | `crontab -v` | Display the last time you edited your crontab file. (This option is only available on a few systems.) | | `crontab -u UserName -l` | List all crontab jobs for the named user| | `crontab -u UserName -l` | List all crontab jobs for the named user| </br> ### Command Switches/Parameters | Commands | Description | | :-----------------------------| ------------------------------------------------------------------------: | | `-u` | Specifies the user whose crontab is to be viewed or modified. If this option is not given, crontab opens the crontab of the user who ran crontab | | `-l` | Display the current crontab. | | `-r` | Remove the current crontab. | | `-e` | Edit the current crontab, using the editor specified in the environment variable | | `-i` | Same as -r, but gives the user a yes/no confirmation prompt before removing the crontab | </br> ### Time and Date Fields | Commands | Description | | :-----------------------------| ------------------------------------------------------------------------: | | `minute` | Minutes, expressed as a whole number from 0-59 | | `hour` | Hour, expressed as a whole number from 0-23 | | `day of month` | Day of the month, ranging from 1-31. The asterisk indicates that task can run on any day of the month | | `month` | Month, which can range from 1-12. The asterisk indicates that task can run on any month of year | | `day of week` | Day of the week. This is represented by a number from 0-7. Zero or 7 is Sunday. 1 is Monday. 6 is Saturday | </br> ### Shorthand Keywords Note: Keywords given below are non-standard and may not run on every system. | Commands | Description | | :-----------------------------| ------------------------------------------------------------------------: | | `@reboot` | Run once at startup | | `@yearly` | Run once a year (0 0 1 1 *) | | `@annually` | Same as @yearly | | `@monthly` | Run once a month (0 0 1 * *) | | `@weekly` | Run once a week (0 0 * * 0) | | `@daily` | Run once a day (0 0 * * *) | | `@midnight` | Same as @daily | | `@hourly` | Run once an hour (0 * * * *) | </br> ### Examples Execute specified script twice a day at 6 AM and 6 PM daily: 0 6,18 * * * script.sh Execute specified script every minute: * * * * * script.sh Execute specified script every every day at 00:00: 0 0 * * * script.sh Execute specified script every 5th minute: */5 * * * * script.sh Execute specified script every day at 8 AM: 0 8 * * * script.sh Execute specified script every hour at minute 0: 0 * * * * script.sh Execute specified script every Sunday at 5 PM: 0 17 * * sun script.sh Execute specified script on selected months: * * * jan,may,aug * script.sh Execute specified script every four hours: 0 */4 * * * </br> ### Online Cron Job Generators https://crontab.guru/ https://www.freeformatter.com/cron-expression-generator-quartz.html https://crontab-generator.org/ -
adojos revised this gist
Mar 24, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## CronTab Essential Commands </br> -
adojos revised this gist
Mar 24, 2023 . No changes.There are no files selected for viewing
-
adojos revised this gist
Mar 24, 2023 . 1 changed file with 4 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,24 +4,11 @@ | Commands | Description | | :------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | `crontab -e` | Edit crontab file, or create one if it doesn’t already exist. | | `crontab -l` | List cronjobs, display crontab file contents | | `crontab -r ` | Remove your crontab file | | `crontab -v` | Display the last time you edited your crontab file. (This option is only available on a few systems.) | </br> -
adojos revised this gist
Mar 24, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ | Commands | Description | | :------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | `crontab -e` | This is used to edit or create a new crontab ile | | `ls -al ~/.ssh` | List existing SSH Keys from standard SSH folder in user profile folder | | `ssh-keygen -t rsa -b 4096 -C "your_email@example.com"` | Generating SSH Keys using SSH-Keygen tool of OpenSSH | | `eval $(ssh-agent -s)` | Starts the SSH-Agent in the background | -
adojos revised this gist
Mar 24, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ | Commands | Description | | :------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | `crontab -e` | Prints SSH-Agent verion information | | `ls -al ~/.ssh` | List existing SSH Keys from standard SSH folder in user profile folder | | `ssh-keygen -t rsa -b 4096 -C "your_email@example.com"` | Generating SSH Keys using SSH-Keygen tool of OpenSSH | | `eval $(ssh-agent -s)` | Starts the SSH-Agent in the background | -
adojos revised this gist
Mar 24, 2023 . No changes.There are no files selected for viewing
-
adojos revised this gist
Mar 24, 2023 . 1 changed file with 27 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,27 @@ ## CronTab Commands Reference </br> | Commands | Description | | :------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | `ssh -V` | Prints SSH-Agent verion information | | `ls -al ~/.ssh` | List existing SSH Keys from standard SSH folder in user profile folder | | `ssh-keygen -t rsa -b 4096 -C "your_email@example.com"` | Generating SSH Keys using SSH-Keygen tool of OpenSSH | | `eval $(ssh-agent -s)` | Starts the SSH-Agent in the background | | `ssh-add ~/.ssh/id_rsa` | Adds your Private key to SSH-Agent | | `ssh -T git@github.com` | Testing your GitBash authentication with Github | | `ssh-keygen -p` | Changing passphrase of an existing SSH Key | | `ssh-add -D` | For removing 'ALL' private keys from the SSH-Agent | | `ssh-add -d /home/user/.ssh/id_rsa` | For removing 'A Single' named private key from the SSH-Agent | | `eval $(ssh-agent -s)` | Starts the SSH-Agent | | `ssh-add -l` | To list the ssh-keys currently available with SSH-Agent | | `ssh-add -L` | With the -L option, the keys in the SSH-Agent can be listed as well. While the -l option shows the fingerprint for each key, the -L option shows the public key part of each key. | | `eval $(ssh-agent -s -k)` | To terminate the SSH-Agent the following command can be executed. kill the SSH-Agent. | <br/> ## Reference Links [Official OpenSSH Commands Reference](https://www.openssh.com/manual.html) </br> -
adojos created this gist
Mar 24, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@