I would like to run tasks once a month, say, on the 22nd day of the month, on my laptop running Ubuntu 12.04.
Since this is a laptop, and I cannot always use it every 22nd day of every month, cron not a good option.
Looking into anacron seems to be a limitation. Namely, you can specify a βperiodβ, but not a specific day of the week or day of the month, as suggested by the anacrontab format:
# cat /etc/anacrontab period delay job-identifier command 7 15 test.daily /bin/sh /home/myself/backup.sh
I would like to say that if we are on the 22nd day of the month, and, of course, the laptop is working, start work. If the 22nd is transferred and you did not start the task, run it as soon as I download.
I'm going to do something ugly, like mixing cron and anacron using my own scripts or writing my own bash script using timestamps, possibly rethinking the square wheel in the process.
Any idea for a better action?
Greetings.
source share