[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: One thing each 3 days but maximum 10
From: |
Ihor Radchenko |
Subject: |
Re: One thing each 3 days but maximum 10 |
Date: |
Mon, 31 Oct 2022 05:16:00 +0000 |
Jean Louis <bugs@gnu.support> writes:
> * Renato Pontefice <renato.pontefice@gmail.com> [2022-10-30 19:11]:
>> I have to take a pill each 3 days, but for max 10 times.
>> So I set a TODO pill >2022-10-28 +3d> and each 3 days my calendar tell me
>> that I have to take the pill. But is possible to say 1/10; 2/10; 3/10 etc?
>> I nean to show how many pill I have already take?
>
> Use PostgreSQL to give you schedule:
>
> #+BEGIN_SRC sql :engine postgresql :results value raw
> SELECT '** TODO Take pill again
> SCHEDULED: <' || generate_series('2022-10-28', '2022-11-26', '3
> day'::interval)::date || E'>\n'
> AS "* My treatement";
> #+END_SRC
>
> #+RESULTS:
> * My treatement
> ** TODO Take pill again
> SCHEDULED: <2022-10-28>
>
> ** TODO Take pill again
> SCHEDULED: <2022-10-31>
This is not a good idea for pills.
Without SQL, one could also use org-clone-subtree-with-time-shift, but
AFAIK, the whole idea behind schedule of taking pills is to retain
certain concentration of medicine in the blood flow. Hence .+3d repeater
(3d from the last time taking the pill) is more suitable.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>