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

    • Download old Windows Startup Sounds @ https://www.winhistory.de/more/winstart/winstart_en.htm
    • Surface Copilot+ PCs coming to classrooms from July 22, turbocharged with on-device AI by Paul Hill Microsoft has announced that it’s launching the new Surface Pro 12-inch and Surface Laptop 13-inch models specifically for education customers from July 22. The Redmond giant said that these devices are being launched as a direct response to feedback from educators who want practicality and ease of use in their diverse classrooms. These are both Copilot+ PCs so teachers and students will be able to leverage the latest AI features thanks to the dedicated Neural Processing Units (NPUs) that allow for on-device AI. The on-device AI, aside from delivering well-known features like Recall, will enable new education features such as a new app Microsoft is working on called Microsoft Learning Zone. Microsoft Learning Zone will allow teachers to create personalized lessons by adapting content from trusted sources like OpenStax, generating interactive games with Kahoot, and tracking students progress. Microsoft expects this to help teachers save time and deliver a more flexible and engaging classroom. Another AI feature that will be available is Click to Do. This lets students highlight text or images and get contextual help. It can be used to summarize a paragraph or explain a graph. To activate it, students can press the Windows key and click. This feature runs entirely on device so inputs to the AI are secure and you don’t need to ever worry about third-parties seeing. Finally, these devices will also have accessibility features such as Voice Access which lets you navigate with speech and Live Captions which provide real-time subtitles and translations for spoken content. These make the devices more inclusive for students with disabilities. Regarding security, these laptops come with the Microsoft Pluton security chip directly integrated into the processor for protecting sensitive data. It can protect data such as passwords and sign-ins, even if your device is stolen. Thanks to automatic Windows Updates, schools never need to worry about falling behind on updates either. With the impending demise of Windows 10 in mid-October, these Surface devices arrive just in time for schools looking for somewhere to upgrade to. Aside from AI features and security, Microsoft is also pushing other key features including easy repair with replacement components at the Microsoft Store and iFixit, their lightweight design and all-day battery life making them ideal for carrying and surviving the school day, and their compatibility with popular education apps such as TestNav, Google Classroom, Minecraft Education, and Adobe Express.
  • 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
      545
    2. 2
      ATLien_0
      205
    3. 3
      +FloatingFatMan
      170
    4. 4
      Michael Scrip
      151
    5. 5
      Som
      131
  • Tell a friend

    Love Neowin? Tell a friend!