From a16d20deceeccfe4fe7ea60bfe970588bce04991 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz <markus@fleschutz.de> Date: Sat, 6 Feb 2021 16:14:05 +0100 Subject: [PATCH] Added daily-tasks.sh --- Data/scripts.csv | 1 + README.md | 1 + Scripts/daily-tasks.sh | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100755 Scripts/daily-tasks.sh diff --git a/Data/scripts.csv b/Data/scripts.csv index a0a61f2d..5dbb315c 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -13,6 +13,7 @@ close-thunderbird.ps1, closes Mozilla Thunderbird gracefully close-windows-terminal.ps1, closes Windows Terminal gracefully configure-git.ps1, sets up the Git configuration csv-to-text.ps1, converts the given CSV file into a text list +daily-tasks.sh, execute PowerShell scripts automatically as daily tasks (Linux only) decrypt-file.ps1, decrypts the given file display-time.ps1, displays the current time for 10 seconds by default download.ps1, downloads the file/directory from the given URL diff --git a/README.md b/README.md index 76a5603d..cf9c686e 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol * [close-windows-terminal.ps1](Scripts/close-windows-terminal.ps1) - closes Windows Terminal gracefully * [configure-git.ps1](Scripts/configure-git.ps1) - sets up the Git configuration * [csv-to-text.ps1](Scripts/csv-to-text.ps1) - converts the given CSV file into a text list +* [daily-tasks.sh](Scripts/daily-tasks.sh) - execute PowerShell scripts automatically as daily tasks (Linux only) * [decrypt-file.ps1](Scripts/decrypt-file.ps1) - encrypts the given file * [display-time.ps1](Scripts/display-time.ps1) - displays the current time for 10 seconds by default * [download.ps1](Scripts/download.ps1) - downloads the file/directory from the given URL diff --git a/Scripts/daily-tasks.sh b/Scripts/daily-tasks.sh new file mode 100755 index 00000000..e67dcbfb --- /dev/null +++ b/Scripts/daily-tasks.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Syntax: ./daily-tasks.sh +# Description: execute PowerShell scripts automatically as daily tasks (Linux only) +# copy this script to /etc/cron.daily and adapt it +# Author: Markus Fleschutz +# License: CC0 + +HOMEDIR=/home/mf +# adapt this to your home directory + +$HOMEDIR/PowerShell/Scripts/query-smart-data.ps1 $HOMEDIR +# to query S.M.A.R.T. data of all your HDD's/SSD's + +$HOMEDIR/PowerShell/Scripts/train-dns-cache.ps1 +# to train the DNS cache with well-known domain names + +exit 0