miriam_e: from my drawing MoonGirl (Default)
[personal profile] miriam_e
This calculates even weeks, that is, it can calculate fortnights:
expr \( `date +%s` / 604800 \) % 2 >/dev/null || echo "even"

or if you want odd weeks:
expr \( `date +%s` / 604800 + 1 \) % 2 >/dev/null || echo "odd"

There are 604800 seconds in a week.
"% 2" gives the remainder after division by 2.
When expr evaluates to zero the command after the OR (||) is run.

My rubbish collection is on alternate weeks. But cron doesn't know about fortnights and I only put my rubbish out once every two or three months (I don't have much waste). So I use this in cron to trigger an alert on the appropriate day:

0 10 * * mon expr \( `date +\%s` / 604800 + 1 \) \% 2 > /dev/null || alert "garbage day"

I can't remember why I escaped the "%" symbols. I think maybe cron chokes on them if you don't.

Oh, I should add that "alert" is not a standard command. It is a script that I wrote which puts a notice on the screen and uses speech synthesis to announce the message.

Date: 2017-12-09 11:24 am (UTC)
greylock: (Default)
From: [personal profile] greylock
My rubbish collection is on alternate weeks. But cron doesn't know about fortnights and I only put my rubbish out once every two or three months

I am impressed it is that infrequently. Broadly, the two of us create about 1.5 bags of rubbish a week (the Glad bags, so about half a dark green traditional bag), and if it weren't for the cat litter and waste cat food (and maggots) I'm not sure we could still swing that. (And that's not including the green waste and recycling bins - although I swap the bins about physically as a reminder).

I know I have completely avoided your cron job comment, but hey...

Date: 2017-12-09 12:59 pm (UTC)
greylock: (Default)
From: [personal profile] greylock
I've always been told to keep weeds out of compost and (since I use a tumbler, and we have local chickens, hence mice and rats I'd not use any ground-based composter). I might be missing something (I'm guessing my small suburban garden is a different eco system to your set up).

I need a way to ensure I can control and regulate the solar furnace I'm intending to use. There is a narrow range between melting the plastic and burning it. I haven't solved that yet.

I'm actually impressed. (As in, not just saying I'm impressed, but the next level).
My understanding is that the hydrocarbon chains in plastic are such that you won't get anywhere with repurposing (although, if you could, fertilisers might be worthwhile), because my science is high school level and pop-sci, but I don't know enough to say it can't work.

Letting convective air move through such compartments will keep the room at a stable temperature regardless of the weather outside -- and at zero energy cost.

I'd not have thought (plastic) milk bottles would be strong enough. But good luck.

Date: 2017-12-10 02:03 pm (UTC)
greylock: (Default)
From: [personal profile] greylock
She brilliantly suggested I use frozen veggies. No more food waste

We're pretty light on for food waste. For me it's stuff like the scraps from onions, mostly.
My partner is a bit paleo and the like, but for all of that, we're never actually filled the composter to bursting.

I would like chickens, but Julie won't allow it. Being far out in the country we have rodents anyway.

But free EGGS!

The milk bottles used as a temperature store in the little house don't need to be strong.

Profile

miriam_e: from my drawing MoonGirl (Default)
miriam_e

June 2025

S M T W T F S
1234567
891011121314
15161718192021
222324 25262728
2930     

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 13th, 2025 05:00 pm
Powered by Dreamwidth Studios