
Ask HN: How can I run a program for 1 month against my will? - thinkloop
I wrote a program that does various things around my smart home at various times. I want this program to run for exactly 1 month, even against my will if I change my mind. What&#x27;s an interesting way to try and achieve this?<p><i>Perhaps</i> something along the lines of: starting the program in admin mode, having the password changed to something I don&#x27;t know, having the password somehow revealed to me at the end of the month. That way, hopefully, the only way to stop the program is by reformatting or some other similar annoying barrier. Just a random idea.
======
yusefnapora
How strong is your will? You can always just unplug the box the program is
running on, so your in-the-moment desires will always have the opportunity to
win.

So the real question is what kind of disincentive can you bake in that will be
stronger than your future self's desire to turn off this mysterious program.

If you like money, you could have the program generate a crypto wallet but
don't save the private key to disk. Program it to refund any coins sent to it
after 30 days, and now you have a financial incentive to keep that process
running, since if it ever loses power or otherwise terminates, your money
disappears.

~~~
Wowfunhappy
Well, if the program ran on their main computer, that would be a pretty strong
disincentive to unplug it.

------
throwaway888abc
How about some basic psychological barrier ? Do some 'strange' ritual before
getting the password under pursuing circumstances. Like break emergency glass
et.etc.

[https://psychcentral.com/blog/3-more-obstacles-in-therapy-
an...](https://psychcentral.com/blog/3-more-obstacles-in-therapy-and-how-to-
overcome-them/)

------
idoh
This is so vague. What do you want done around your house? Why do you not want
the ability to stop it? How unstoppable does it need to be?

~~~
dylz
Probably something like turning off the lights at a specific time to reinforce
good scheduling and with the ability to not turn them back on to prevent
easily un-breaking a habit?

------
DonCopal
Make a program which changes the password that you mention to something random
(as in, the executable executes Random() on start and changes the password).
After that the programs waits for one month and at the end outputs that string
to you. This has the effect that 1. killing the process won't do anything
because the password is alredy changed 2. you can't figure out what's the new
password because it was created during runtime and it's random 3. you have to
wait for 1 month for sleep command to finish and outpuy be displayed in the
console.

------
BenjiWiebe
Just an idea, don't know how workable it is...

Rent a vps. Prepay for a month. Start your program. Write code to change the
vps provider account's password (and 2FA?) and ssh password to lock you out.
Have the code change passwords back after a month.

On second thought - don't have the code change passwords. Just have the code
generate a long random password that you paste into the change password
fields. Then the code emails you the password after the month is up. That way
you don't have to try to automate the VPS provider's change password system.

------
unknownkadath
This seems like the kind of thing a father might impose on a teenage child and
have backfire hugely, not that this is your situation! Not to mention
malicious pranks...

However, if it's just for you, maybe you could make the smart home keee
$CONDITION until a particular smart contract on the Etherium blockchain
changes state, and have the contract keep some money in escrow until one month
has elapsed, at which time it is sent back to your wallet. If you cancel
early, then the money goes into, say, the pi-hole donation address.

------
oh_sigh
Just consider yourself a failure if you stop the program.

~~~
vulcan01
exit code 1

------
scosman
Don’t forget, even if you can’t physically access it you could always flip the
breaker. Run it on a raspberry Pi running off of a 10000mah phone battery,
charging from an outlet. Make sure the outlet is on a breaker you couldn’t
live without for 24 hours (fridge is a good bet). For physical barrier, put it
behind the fridge (if that’s enough to dissuade you, don’t know the use case).

------
anotheryou
I don't know your setup, but a few Ideas:

\- program just runs 1 month, put a raspberry in epoxy

\- generate a long password (long enough so it doesn't matter you saw it a few
times), find some reminder service or ask a friend to mail it back in a month,
delete all local evidence of the password

\- generally sealing all relevant equipment with a lock could work. Key has to
go to someone else.

------
zadokshi
Encase the computer (along with a backup power supply that can last up to one
month) in enough concrete that it would be impractical to break open. Ensure
network packets can get out to issue commands to your smart house, but inbound
connections are not allowed for one month.

------
fsociety
Hmm is forcing future you to do something going to change how you feel about
doing that something?

------
pesfandiar
If you have physical access to the box, you can always unplug it or destroy
the unit. Where do you draw the line for the obstacle? Regardless, you may
want to look into running a dead man's switch on an external box that you
don't physically control (AWS?).

------
kahlonel
A low power device, powered by a battery, and put into a safe. Tell a friend
to lock the safe with a code, go somewhere unknown to you, and block you from
all kinds of contact for a month.

------
dollers
Ehereum was designed to do this. Look it up. I'm a bit stunned no one has
mentioned it.

------
pipework
Have someone else run it for you.

------
quickthrower2
Pay me $1000. I give you it back if you don't change your mind.

------
Gollapalli
I think the better question is _why_?

Why do you want to run for one month even if you change your mind?

