[solved] crontab Mint 19 ??

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Mattyboy

[solved] crontab Mint 19 ??

Post by Mattyboy »

Just getting into automation/crontabs so I'm wondering if this is a me 'error' or its Mint 19... I did read a blog post to the same effect..

Jobs not starting, nothing happens. Nothing in the .sh that requires elevated privileges and the only thing that I can see that may be a problem ( ?? ) is root owning the .sh dunno.

Can someone with a bit more experience please cast their eyes over this and confirm its either my mistake or a problem with 19.

Thanks guys.

EDIT:... The script works fine when I run it btw.

Code: Select all

mintman@mintman-To-be-filled-by-O-E-M:~$ inxi -b
System:    Host: mintman-To-be-filled-by-O-E-M Kernel: 4.15.0-23-generic x86_64 bits: 64
           Desktop: Cinnamon 3.8.4  Distro: Linux Mint 19 Tara
Machine:   Device: desktop System: Gigabyte product: N/A serial: N/A
           Mobo: Gigabyte model: G1.SNIPER B7-CF v: x.x serial: N/A
           UEFI: American Megatrends v: F4 date: 11/02/2015
CPU:       Dual core Intel Core i3-6100 (-MT-MCP-) speed/max: 800/3700 MHz
Graphics:  Card: NVIDIA GP106 [GeForce GTX 1060 6GB]
           Display Server: x11 (X.Org 1.19.6 ) drivers: nvidia (unloaded: modesetting,fbdev,vesa,nouveau)
           Resolution: 1920x1080@60.00hz
           OpenGL: renderer: GeForce GTX 1060 6GB/PCIe/SSE2 version: 4.6.0 NVIDIA 390.48
Network:   Card-1: Intel Ethernet Connection (2) I219-V driver: e1000e
           Card-2: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) driver: ath9k
Drives:    HDD Total Size: 6129.3GB (59.8% used)
Info:      Processes: 232 Uptime: 4 min Memory: 1458.0/7929.5MB Client: Shell (bash) inxi: 2.3.56 

mintman@mintman-To-be-filled-by-O-E-M:~$ crontab -u mintman -l
# Edit this file to introduce tasks to be run by cron.
# 
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
# 
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').# 
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# 
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
# 
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# 
# For more information see the manual pages of crontab(5) and cron(8)
# 
#	m	h	dom        mon	dow	        command
	5,30	10,20	*	   *	1,3		bash ~/Bin/backups.sh
mintman@mintman-To-be-filled-by-O-E-M:~$ tail -n1 .bashrc
PATH="$PATH:$HOME/Bin"
mintman@mintman-To-be-filled-by-O-E-M:~$ ll ./Bin/
total 32
drwxrwxr-x  3 mintman mintman  4096 Jun 12 22:48  ./
drwx------ 32 mintman mintman 12288 Jun 14 11:20  ../
drwxrwxr-x  2 mintman mintman  4096 Jun 12 23:10 'Backup Logs'/
-rwxr-xr-x  1 root    root      254 Jun 12 22:19  backups.sh*
mintman@mintman-To-be-filled-by-O-E-M:~$ 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Pierre
Level 21
Level 21
Posts: 13192
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: crontab Mint 19 ??

Post by Pierre »

do remember that the LM19 series is still in Beta - - so therefore some stuff may not work too well.

it's recommended that you just experiment with the new LM19 Beat at this stage,
and if it works for you - then you've done well.
:)
if fact we are looking for folks - who have managed to get LM19 to work for them ATM,
as it's technically not an OOB experience ATM . .

even when it's released, there is a multitude of changes under the hood, that may slow you down.
- - it's anyones guess ATM, to just what will work & just what will be broken - once it goes RTM . . .
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Mattyboy

Re: crontab Mint 19 ??

Post by Mattyboy »

Pierre :)

Yeah sure.

I'm just trying to determine if its my error or an actual problem with 19. So I guess the question would be should my crontab work, if say I was using Mint 18.x
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: crontab Mint 19 ??

Post by catweazel »

Mattyboy wrote: Thu Jun 14, 2018 6:56 am I'm just trying to determine if its my error or an actual problem with 19. So I guess the question would be should my crontab work, if say I was using Mint 18.x
Hypothetical troubleshooting is an oxymoron.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
Pierre
Level 21
Level 21
Posts: 13192
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: crontab Mint 19 ??

Post by Pierre »

well - - I'm no Guru with scripts, but it did seem to be ok by me ..

so catweazel - have you done more with scripting stuff ?
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Mattyboy

Re: crontab Mint 19 ??

Post by Mattyboy »

Pierre wrote: Thu Jun 14, 2018 7:11 am well - - I'm no Guru with scripts, but it did seem to be ok by me ..
Ok, thanks. I'll post it as a bug report on the blog.
catweazel wrote: Thu Jun 14, 2018 7:04 am
Hypothetical troubleshooting is an oxymoron.
catweazel, buddy......... :) https://www.youtube.com/watch?v=Sk23IB7_BNY
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: crontab Mint 19 ??

Post by catweazel »

Pierre wrote: Thu Jun 14, 2018 7:11 am well - - I'm no Guru with scripts, but it did seem to be ok by me ..

so catweazel - have you done more with scripting stuff ?
Hypothetically speaking?
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
Pierre
Level 21
Level 21
Posts: 13192
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: crontab Mint 19 ??

Post by Pierre »

catweazel wrote: Thu Jun 14, 2018 7:48 am
Pierre wrote: Thu Jun 14, 2018 7:11 am well - - I'm no Guru with scripts, but it did seem to be ok by me ..

so catweazel - have you done more with scripting stuff ?
Hypothetically speaking?
Yeah - - Hypothetically speaking - - but take your Tinfoil Hat Off - first.
:)
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: crontab Mint 19 ??

Post by thx-1138 »

...just a guess in the wild - is a cron service running properly in the first place?
Ie. on 18:
$ systemctl list-units -t service -all | grep cron
anacron-resume.service loaded inactive dead Run anacron jobs at resume
anacron.service loaded inactive dead Run anacron jobs
cron.service loaded active running Regular background program processing daemon
$ systemctl status cron
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-06-14 09:55:57 EEST; 5h 59min ago
Docs: man:cron(8)
Main PID: 760 (cron)
CGroup: /system.slice/cron.service
└─760 /usr/sbin/cron -f
Asking because i see that it seems things are moving over to systemd-timers lately... (and i ain't got the slightest idea how those work...)
Mattyboy

Re: crontab Mint 19 ??

Post by Mattyboy »

thx-1138 wrote: Thu Jun 14, 2018 9:00 am
From what I can tell, output looks slimier to what you've provided ??

Code: Select all

mintman@mintman-To-be-filled-by-O-E-M:~$ systemctl list-units -t service -all | grep cron
  anacron.service                                                                           loaded    inactive dead    Run anacron jobs                                                                
  cron.service                                                                              loaded    active   running Regular background program processing daemon                                    
mintman@mintman-To-be-filled-by-O-E-M:~$ systemctl status cron
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-06-14 15:06:28 BST; 3min 50s ago
     Docs: man:cron(8)
 Main PID: 988 (cron)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/cron.service
           ├─ 988 /usr/sbin/cron -f
           ├─ 997 /usr/sbin/CRON -f
           ├─1012 /bin/bash -c sleep 10m && timeshift --create --scripted --tags B
           └─1014 sleep 10m

Jun 14 15:06:28 mintman-To-be-filled-by-O-E-M systemd[1]: Started Regular background program processing daemon.
Jun 14 15:06:28 mintman-To-be-filled-by-O-E-M cron[988]: (CRON) INFO (pidfile fd = 3)
Jun 14 15:06:28 mintman-To-be-filled-by-O-E-M cron[988]: (CRON) INFO (Running @reboot jobs)
Jun 14 15:06:28 mintman-To-be-filled-by-O-E-M CRON[997]: pam_unix(cron:session): session opened for user root by (uid=0)
Jun 14 15:06:28 mintman-To-be-filled-by-O-E-M CRON[1012]: (root) CMD (sleep 10m && timeshift --create --scripted --tags B)
mintman@mintman-To-be-filled-by-O-E-M:~$ 
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: crontab Mint 19 ??

Post by thx-1138 »

Ok, at least it still exists... but no idea other than that :|
Mattyboy

Re: crontab Mint 19 ??

Post by Mattyboy »

thx-1138 wrote: Thu Jun 14, 2018 10:22 am Ok, at least it still exists... but no idea other than that :|
Ok, that's cool, I can live with it if its a 'problem' with 19 and can wait until its resolved..... its just nice knowing its not another in a long line of my PEBKAC's :lol:

Cheers.
Mattyboy

Re: crontab Mint 19 ??

Post by Mattyboy »

Just an fyi people.

This 'problem' is now solved in 19 my crontab is working just fine.
Locked

Return to “Beginner Questions”