# Scripts That Run Without You

cron runs a script from your home folder, with a short PATH, no terminal and no keyboard, so a script that works when you type it can fail at 18:00; give it full paths and a PATH of its own, write everything to a log with the date and time, never ask a question, and take a lock with flock so two copies never run at once.

![Cheat sheet for the lesson Scripts That Run Without You: cron runs a script from your home folder, with a short PATH, no terminal and no keyboard, so a script that works when you type it can fail at 18:00; give it full paths and a PATH of its own, write everything to a log with the date and time…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/89b52462cbd9432682b64cfc13ab2ae3.webp)

- Category: Bash
- Level: Freelancer
- Tags: absolute-path, environment-variable, file-lock, flock, linux, log-file, path, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-unattended-scripts-cheat-sheet
