This seems easy at first, but it turns out to be a lot harder than expected, due to various OS and power settings that get in the way. The idea is simple: you want to have your Windows 10 machine start up at a specific time using a task set in the task scheduler.
When you create a new task in the Task Scheduler, there’s a setting for this, so it looks so easy. It’s on the conditions tab. You activate the option to wake the computer to execute your task, and you’re done. Right? Well, if you’re really lucky that might work straight out of the box. In case it doesn’t work, here are some things you can fiddle with to try and get it going.
Create a wake-up tasks that doesn’t really do anything. Just run a command like this: cmd /c echo %date% For a more detailed guide on how to set up a task and the wake timers check this excellent article.
Create a second task that does what you want it to do in a batch script but 10 minutes later than the first. That gives your computer ample time to start up, install any potential updates, or do whatever it sometimes does that takes so damn long.
Always hibernate your machine. If you just do a plain shutdown it doesn’t seem to automatically start up again. You can do this with the command below. This is also handy if you want to shut your machine down again, after your task has finished: shutdown /h
Enable wake timers in your Power Options advanced settings. See the link below for instructions.
For laptops make sure your Power Options are configured correctly. Mind closing the lid in that case. A closed lid will prevent the laptop from starting up in my case for example. Laptops will also not startup when they are running on the battery by default.
Reboot your machine after fiddling with these settings if it still doesn’t work. This makes sure your settings stick.
If you tried everything and it still doesn’t work, check your BIOS settings and see if there might be a power option in there that might prevent it from starting up automatically.
Give your machine a few minutes if you’re testing this. Yes, it’s annoying to wait, but if you set it too fast, it might not be powered down fast enough to be able to start up again, and miss the timer. That way you won’t be able to tell if it’s actually working.
Hopefully you can now use your desktop or laptop to run some nightly scheduled jobs, without having to have a dedicated always-on machine around. Saves you time and money on power consumption, hardware and maintenance!
Times are tough and stressful for everyone right now. So perhaps a bit of ambient and chill tunes can help to relax a little in this taxing times.
I blogged about Moby’s Long Ambient release a while ago, and I recently found out he also released a second installment of great, long ambient tunes to chill to for free. I love to put these on when I try to get some sleep on a flight. But I guess I won’t be doing that anytime soon.
Let’s say you have this IOT device like a motion detection camera. Which sends you emails. Emails you keep in a separate IMAP mailbox. Lots of emails. So you want to delete those emails in some automated fashion, because doing that daily is oh so boring (remember, lots of emails).
Wouldn’t it be great if there was like some handy command line tool that would delete the oldest emails and keep like a 1.000 or 500 of them only? Well yes, that way I could script that annoying job and run it daily.
I didn’t find something that already did this. So I figured I’d be able to whip something up in an hour or so using PowerShell, or maybe a small .NET console application using an existing IMAP library.
Well, 3 different IMAP libraries and about 4 hours later I did have something rudimentary that finally did what it was supposed to do. Delete the oldest email, and leave the most recent 1000 (or whatever number you want) behind. That took longer than expected, so to regain as much time spent on this as possible I threw the ImapCleanup tool on GitHub, including binary downloads. I hope someone else will find this useful as well.
Beware though. This tool deletes emails. Be careful which mailbox you point this at, and make sure you test it in advance on a dummy mailbox. Maybe your email server behaves differently than mine, and important emails get digitally shredded by mistake.
A while ago I saw this Facebook post in a breakcore group pass by with a call for submissions for a compilation album on some net-label. So I checked some of my unfinished tunes and found something suitable to finish and submit.
So here it is. The album turned out to be a “glorious mess” of very different types of breakcore tunes. Check it out if you want to be surprised and feel like listening to a something different. I bet you’ll find something cool you like in there. If not, no big loss. You can listen to the full album here and on Bandcamp, and download for free if you want.
How about some nice oriental eye candy? Here are some beautiful pastel Japanese sights from artist Elora Pautrat. I’m only showing a few of those below. If you want more of those, and in higher resolutions, you’ll have to head over to her Owakita_ Twitter account and get them from the media list. You can also get them from her website, but you’ll have to dig a little deeper there as the images can’t be directly downloaded. In Firefox, you can get them by right-clicking and choosing View Page Info > Media, or by saving the full page to your hard drive. This last trick also works with Chrome.
Note that these are for personal use only. You’re free to use them as desktop or phone wallpapers, or use them as your Twitter banner. But no commercial use of any kind please.
Last post I talked about setting up a serverless website on Azure using BLOB storage. What I didn’t go into is how to publish files to that site automatically. Yes, you can use the BLOB explorer to manually upload your files but seriously, who wants to do that kind of boring task if you can let computers do that for you.
I commit & push my changes to the master branch of my git repository.
A GitHub action kicks in and published the site to the Azure BLOB container.
How sweet is that? Pretty sweet, I know. How do you set this up? Well let me take you through the steps my friend, and automated Git deployment will soon be yours to enjoy as well.
You need to create a Git repository on GitHub. Now that you can create unlimited private repositories, you don’t even have to expose it to the public, which is nice.
Clone the repo locally, and create a source/ directory in it. This is where the source code will go, and that’s what we’ll push to the Azure BLOB container. Any other files you don’t want published go in the root, or in other folders in the root of your repository.
Copy your source code into the source/ folder, or create a simple index.html file for testing the publishing action.
Go to your repository page on the GitHub site, and click the Actions tab at the top.
Click New Workflow, choose “set up a workflow yourself”.
It will now create a YAML file for you containing your workflow code.
Paste the content for your YAML file listed below. Notice the “source” folder in there? That indicates what folder will be copied to Azure. In case you run into trouble, you can dig in to the Azure Storage Action setup yourself, but it should do the trick.
Last step is to set up that CONNECTION_STRING secret. This is the connection string to your Azure storage container. You can set the secret from your GitHub repository Settings tab, under Secrets. Click New Secret, then use the name CONNECTION_STRING and paste the access key value from your Azure storage account.
You’re all set up! To test your publishing flow, all you need to do now is push a commit to your master branch, and see the GitHub action kick in and do its thing. You should see your site appear in a few seconds. Sweet!
Update: recently I found out the workflow broke because of a bug in the latest version of the action. To bypass this I now fixed the version in my workflow YAML file to v1.0, which still works. It’s probably a good idea to avoid this kind of breaking changes by fixing the version of any action you use in your GitHub actions anyway. It will avoid those annoying issues where things work one day, and don’t the next.