Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cronjob issues with 18.04, it's not working, or i'm not.
#1
I use rsync every day. And in Arch and 16.04 i had it set to do it with cronjob. The last time I touched cron was in 2014. but i switched to 18.04 and set it up again. But today i checked my logs, and it has not given any output,,,,, ever. I am doing something wrong. but what.


sudo crontab -l
Code:
# 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

# 31 17 * * * /bin/sh /etc/cron.daily/cron-rsync-4-bkup-sh
# 45 17 * * * /bin/bash /etc/cron.daily/cron-test.sh
00 18 * * * /bin/sh /etc/cron.daily/cron-test.sh
FLAT-BOX [c;crontab -l] ~                                                          18-09-08  5:49PM
eli:-->



The cron.daily folder looks like this
Code:
eli:--> cd /etc/cron.daily
FLAT-BOX [cd /etc/cron.daily] /etc/cron.daily                                      18-09-08  5:57PM
eli:--> l
0anacron    bsdmainutils          dpkg              man-db              ubuntu-advantage-tools
apport      cracklib-runtime      google-chrome     mlocate
apt-compat  cron-rsync-4-bkup-sh  google-earth-pro  passwd
aptitude    cron-test.sh          logrotate         popularity-contest
FLAT-BOX [l] /etc/cron.daily                                                       18-09-08  5:57PM
eli:-->
this is a new ubuntu install.

the test script i am trying to run
Code:
#!/bin/bash

zenity --info --width=200 --text="congratulations \nCron test passed"
 


here is the output log. but it only shows the one test run that i did.
Code:
# This is the backup log for the rsync script /home/eli/Scripts/bkup.sh
# It is Automatically called for by /etc/cron.daily/cron-rsync-4-bkup-sh
# Or Manually from /home/eli/Scripts/cron-rsync-4-bkup-sh

######## testing ##########

BACKUP success-Sat Apr 28 18:39:27 CDT 2018

###### end of test ########


what have i missed. i set permissions for all these to 755 so ,,,, uh.. help! please

I have forgotten something or 18.04 is broken. prolly me. lol

P.S.
i am pretty sure it is not the scripts, because they work perfectly when i run them manually.
A computer without Microsoft is like a piece of chocolate cake without ketchup and mustard.


Telegram @eliasw4u
Reply


Messages In This Thread
cronjob issues with 18.04, it's not working, or i'm not. - by eliasw4u - 09-08-2018, 11:17 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)