Browse Source

this is horrible

master
Roxy 12 months ago
commit
856edc1869
  1. 10
      README.md
  2. 22
      cron-but-worse.sh
  3. 18
      cron-but-worse.xml
  4. 2
      vogel-10.sh
  5. BIN
      vogel-10.wav
  6. 12
      vogel-sex.service

10
README.md

@ -0,0 +1,10 @@
#cron but worse
## how to use
basically just put it in your home folder and change scripts/paths and stuff
## how make systemd shits work ?
change exec path to where yuo put script duh
## what it do ?
basically just checks if a certain time in HH:MM format is every 60 seconds and if time matches with what is defined in cron-but-worse.xml it will execute what is in the script tag

22
cron-but-worse.sh

@ -0,0 +1,22 @@
#!/bin/bash
# Path to the XML file
xml_file="./cron-but-worse.xml"
while true; do
# Extract the desired times, descriptions, and scripts from the XML file
times=($(grep -oP '<time>\K[^<]+' "$xml_file"))
descriptions=($(grep -oP '<description>\K[^<]+' "$xml_file"))
scripts=($(grep -oP '<script>\K[^<]+' "$xml_file"))
# Get the current time in HH:MM format
current_time=$(date +%H:%M)
for ((i=0; i<${#times[@]}; i++)); do
if [[ $current_time == "${times[i]}" ]]; then
echo "Executing command at $current_time: ${descriptions[i]}"
eval "${scripts[i]}"
fi
done
sleep 60 # Sleep for 1 minute before checking again
done

18
cron-but-worse.xml

@ -0,0 +1,18 @@
<commands>
<command>
<time>14:45</time>
<description>Play birb sounds for 10 Minutes</description>
<script>/home/sysadmin/vogel-sounds/vogel-10.sh</script>
</command>
<command>
<time>15:30</time>
<description>Play birb sounds for 10 Minutes</description>
<script>/home/sysadmin/vogel-sounds/vogel-10.sh</script>
</command>
<command>
<time>15:45</time>
<description>Play birb sounds for 10 Minutes</description>
<script>/home/sysadmin/vogel-sounds/vogel-10.sh</script>
</command>
</commands>

2
vogel-10.sh

@ -0,0 +1,2 @@
#!/bin/bash
aplay ./vogel-10.wav

BIN
vogel-10.wav

12
vogel-sex.service

@ -0,0 +1,12 @@
[Unit]
Description=play birb sounds at certain times defined in an xml file
After=network.target
[Service]
ExecStart=/bin/bash /home/sysadmin/vogel-sounds/cron-but-worse.sh
User=sysadmin
Restart=always
[Install]
WantedBy=multi-user.target
Loading…
Cancel
Save