How to lock computer at a certain time


Recommended Posts

  On 02/04/2013 at 16:59, xendrome said:

Make a batch file and call it via task scheduler command is

"rundll32.exe user32.dll, LockWorkStation"

Good luck doing that in Mac OS X.....

Here is one solution:

http://apple.stackex...t-lock-mac-os-x

I'm almost positive it can be done with Automator but I'm not at home to poke around. Lots of neat things can be done in Automator.

  On 02/04/2013 at 19:59, Brian M said:

Easiest way is to stick a reference add a cronjob which references:

/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend

You're doing it wrong, he wants to lock his computer.. ;)

... Let do it properly. (this is for fun btw)

Go to http://www.maplin.co.uk/miniature-short-round-type-spst-2445 and buy a SPST.

Open the Computer case, and locate the power button. Cut the ONE of the wires. Drill a hole big enough for SPST and install in place. Run the cut wire from the power button one of the pins on the SPST and solder it on. Then using the cable that comes from the motherboard, solder that to the other pin on the SPST

note: If the wire isn't long enough for where you want to install it, you can you can order some more or just cut up an Ethernet cable and use the wire from the cords in there.

Now, you can actually use the SPST to lock the PC. Turn the PC off and you'll need to set the key to unlock it to turn it back on.

What you're doing here using a lockable switch. The switch (SPST) needs to be in the On position (unlocked) to allow the PC's momentary button to pass power to the motherboard when it's pressed. Without that, you can't turn the PC on without opening it up.

Later on you use the other pins hook up a robotic arm, along with an alarm clock connected to an old cell phone that you can text to lock and unlock the PC. Using an automated reminder service you can have the PC locked and unlocked automatically and you won't even need a password :D

^ :omg:

Brian M's solution is probably the best one. I thought there was a way to schedule periodic events in Automator, but the only thing close to that is to perform an action based on a calendar event.

According to:

This AppleScript will show the Login Window (essentially "lock" the computer): http://mac.sandman.net/pages/LoginWindowsAndLockScreen

do shell script "/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession -suspend > /dev/null"

Using cron isn't very intuitive. I'm surprised that Apple has not implemented a better way of handling scheduled events by now, because I recall having to use cron for stuff in Tiger. Fortunately, cron is well documented as it is the main task scheduler for Darwin, other BSD distros, Linux, and probably other POSIX complaint operating systems.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Meta says that its "Private Processing technology" will be used. Oh, thank God! Now, I will finally sleep a whole lot better at night trusting FB. 🙄🙄🙄
    • The Teams Admin center is still a mess. I use it all the time. They really need to talk with the Intune or Entra ID folks for help.
    • Senua's Saga: Hellblade II to get 60FPS mode, dev commentary, and more alongside PS5 launch by Pulasthi Ariyasinghe Back in May, Microsoft revealed Senua's Saga: Hellblade II as the next first-party Xbox game to reach PlayStation platforms. Now, that release has an official release date attached to it, and alongside it, developer Ninja Theory is releasing an update across all platforms with some major features, including a 60 FPS mode on consoles. The Performance Mode is easily the biggest addition to the story-focused immersive experience. Ninja Theory is delivering it to both Xbox Series X and PlayStation 5 players, but there is some bad news for Series S owners, as it is being left out from the upgrade. "The result is smoother gameplay, especially noticeable during combat and fast-moving moments of the game," says the developer. It's unclear how much of the game's visuals Performance Mode users will be missing out on compared to the default 30FPS "cinematic" mode. PC players are getting an upgrade too. A Very High preset is being added to the settings menu for those wanting even higher fidelity graphics. Optimizations have also been a focus on PC, and Ninja Theory says that the title will be Steam Deck Verified when the Enhanced update lands in August. Next, similar to the original, Dark Rot is incoming as an optional experience that players can enable when starting a campaign. This will have a rot effect being applied to Senua every time she dies, and if it ever reaches her head, the game will come to an end, with all progress from that save being wiped. The Photo Mode in Hellblade II is being upgraded with this update too, with the studio touting a new Motion tab for cinematic video capture, as well as improvements across the board to the feature. Lastly, four hours of developer commentary is being added to give a behind-the-scenes look at how the studio crafted the story and gameplay. "Hear from the ensemble cast, key collaborators in depicting Senua’s experience of psychosis, and members of the development team who poured their heart and soul into Senua’s story," says the studio. The Senua’s Saga: Hellblade II Enhanced comes out on August 12 across PC, Xbox Series X|S, and PlayStation 5 for all owners and Game Pass subscribers as a free upgrade. As for the PlayStation 5 launch of Senua’s Saga: Hellblade II that's happening on the same day, Microsoft will be offering two versions: Standard and Deluxe. As expected, Standard includes the complete base game for $49.99, but Deluxe goes further by adding on a copy of the first game, Hellblade: Senua’s Sacrifice, as well as its original soundtrack. The Deluxe Edition costs $69.99 to purchase.
    • Not sure what you’re talking about. Has been there for quite a while and in the latest versions it’s actually quite good. I use it several times a day as I am a terrible typist.
  • Recent Achievements

    • Rising Star
      Phillip0web went up a rank
      Rising Star
    • One Month Later
      Epaminombas earned a badge
      One Month Later
    • One Year In
      Bert Fershner earned a badge
      One Year In
    • Reacting Well
      ChrisOdinUK earned a badge
      Reacting Well
    • One Year In
      Steviant earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      549
    2. 2
      ATLien_0
      209
    3. 3
      +FloatingFatMan
      172
    4. 4
      Michael Scrip
      152
    5. 5
      Som
      142
  • Tell a friend

    Love Neowin? Tell a friend!