Use what you have

Having come from the land of machines that were on the line 24/7 I found that one
programs that I miss the most was being able set up a cron job on my laptop for simple,
repetitive tasks like backups and reminders. Cron doesn't work on machines that
cycle. The workaround is Anacron, but there is no fine control.

If you're like I am you do a lot of that with python and shell programs, putting the
programs in the background. I hate canned packages because they are limited and take
up space. I don't usually operate from a GUI. A little imagination in python
programming will allow you to use resources that you already have. Importing from
subprocesses will give you some power at your fingertips. Here is one that I wrote for
personal use.

#!/usr/bin/env python <br>
#-*- coding: utf-8 -*-

from datetime import datetime, date, time
from time import sleep
import subprocess

message = "You stink! Take a shower!"
showerDays = ["Sun","Tue","Fri"]
target = ["21:06"]

while True:
    tod = datetime.now().strftime("%H:%M")
    dow = datetime.now().date().strftime("%a")
    if tod in target and dow in showerDays:
            subprocess.Popen(['notify-send', message])
    sleep(30)
    continue

Happy Hacking!
Steve 
[date=2024-03-16 timezone="America/Denver"]
1 Like

Welcome to the Linux Community, Steve! Your Python script for managing reminders is a neat trick. It really embodies the spirit of hacking together practical solutions for everyday tasks. Looking forward to seeing more of your ideas and contributions around here. You can share such in our showcase forum.

I neglected to say that you had to make the program executable then run it with a
trailing ampersand (&) to move it to the background.