The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 376β€…    Votes:  2β€…    βœ… Solution
Tags: ubuntu   cron  
Link: πŸ” See Original Answer on Unix & Linux πŸ”—

Title: Cronjob not executing, but command works
ID: /2018/12/30/Cronjob-not-executing_-but-command-works
Created: December 30, 2018    Edited:  December 30, 2018
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

In the terminal use:

echo $PATH

When cron is running it doesn’t know all your paths that allows your python script work in the terminal.

The solution is to create a bash script that calls the python script. Before doing so however it executes:

⇧ Filenames with space showing as 'file name' after upgrade to 18.04 Black screen beteen GRUB and login screen  β‡©