summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark McNally <mark@mcnally.je>2021-06-30 18:42:45 +0100
committerMark McNally <mark@mcnally.je>2021-06-30 18:42:45 +0100
commitacc74124b5152525078309c2b51ddd7901673239 (patch)
treedbf15f8a5cfceb25671df3545fbf8af7b8efc1f6
parent9af5424f70e3f84cd08bdc771304d1c200c38c6c (diff)
cron timings explained better, personal ad made less overt
-rw-r--r--cron.html62
1 files changed, 17 insertions, 45 deletions
diff --git a/cron.html b/cron.html
index cc0ac0d..985a5e8 100644
--- a/cron.html
+++ b/cron.html
@@ -61,25 +61,21 @@
</p>
<p>
Crontab expressions look like this <code> * * * * * command-to-run </code>
+ <p>
+ So for our Monday at 3:30AM job we would do the following:
+ <p>
<pre>
- .---------------- minute (0 - 59)
- | .------------- hour (0 - 23)
- | | .---------- day of month (1 - 31)
- | | | .------- month (1 - 12
- | | | | .---- day of week (0 - 6)
- | | | | |
- * * * * *
+ .---------------- minute (0 - 59)
+ | .------------- hour (0 - 23)
+ | | .---------- day of month (1 - 31)
+ | | | .------- month (1 - 12
+ | | | | .---- day of week (0 - 6)
+ | | | | |
+ * * * * *
+30 3 * * 1 apt-get -y update && apt-get -y dist-upgrade
</pre>
<br>
- <aside>
- <p> Run the command <code> cat /etc/crontab </code> to see something similar to the above </p>
- </aside>
- <p>
- So for our Monday at 3:30AM job we would do the following:
- <pre>
- <code> 30 3 * * 1 apt-get -y update && apt-get -y dist-upgrade </code>
- </pre>
<br>
<aside class=callout>
<p>
@@ -90,13 +86,15 @@
<aside>
<p>
The website <a href="crontab.guru">https://crontab.guru</a> is insanely helpful for figuring out specific cron timings
+ <p> Run the command <code> cat /etc/crontab </code> to see a basic expalnation on how to write crontab timings </p>
</p>
</aside>
<p>
- Lets add another Job, our backup job (for the purposes of this our backup command is just called <code> backup </code> We want to run <code> backup </code> Every evening at 11PM, once we work out the timings for this we can add the to the same file as the above by running <code> crontab -e </code> This would mean our full crontab would look like this:
+ Lets add another Job, our backup job (for the purposes of this our backup command is just called <code> backup</code>) We want to run <code> backup </code> Every evening at 11PM, once we work out the timings for this we can add the to the same file as the above by running <code> crontab -e </code> This would mean our full crontab would look like this:
<pre>
- <code> 30 3 * * 1 apt-get -y update && apt-get -y dist-upgrade </code>
- <code> 0 23 * * * backup </code>
+ 30 3 * * 1 apt-get -y update && apt-get -y dist-upgrade
+
+ 0 23 * * * backup
</pre>
<h3> System wide cron directories </h3>
@@ -152,35 +150,9 @@
<h2> Contribution </h2>
<p>
- This article was written by Mark McNally
+ - Mark McNally -- <a href="https://mark.mcnally.je">website</a>, <a href="https://www.youtube.com/channel/UCMiInY8BhSUtCarO6uu6i_g">Youtube</a>
</p>
- <ul>
- <li>
- I am a (internet) LandChad, my website is <a href="https://mark.mcnally.je">here</a>
- </li>
- <li>
- Contact me about this article or just because <a href="mailto:mark@mcnally.je">here</a>
- </li>
- <li>
- I have a <a href="https://www.youtube.com/channel/UCMiInY8BhSUtCarO6uu6i_g">youtube channel</a> where I may post some LandChad related content as well as other content that you will hopefully find interesting
- <li> If you feel like donating: </li>
- <ul>
- <li> XMR: <code> 42ueuWXJGP48xtahfnujWDMFHJVdMGeFj85jxuwPBygkVw1GEBbHfTsDFBByTSLXpDV4bKcNr7EPCfvSJpyYLY5HPvqUmRB </code> </li>
- <li> BTC: <code> 36mXUtU6Kh9pmYvGYPLY7peHU4TR7FBATT </code> </li>
- </ul>
- </ul>
- <p>
- Yes I know I need to set up OpenAlias...
- </p>
-
-
-
-
-
-
-
-
</main>