Cron job interval for every three days restart on first day of new year?

Asked by Hendrik

I have a script to be executed in interval of every three days.
Below is the crontab -e

30 3 */3 * * /bin/sh /etc/sync/sync-finishing.sh

the script containing rsync script to remote server with log parameter rsync-`date +"%F-%I%p"`.log

It work as expected until the start of new year.
In my log folder, it appear as below.

    -rw-r--r-- 1 root root 940225 Dec 26 09:18 rsync-2016-12-25-03AM.log
    -rw-r--r-- 1 root root 941867 Dec 29 08:37 rsync-2016-12-28-03AM.log
    -rw-r--r-- 1 root root 1032740 Jan 2 18:21 rsync-2016-12-31-03AM.log
    -rw-r--r-- 1 root root 185302 Jan 2 23:06 rsync-2017-01-01-03AM.log
    -rw-r--r-- 1 root root 41611 Jan 4 03:49 rsync-2017-01-04-03AM.log
    -rw-r--r-- 1 root root 218770 Jan 7 13:25 rsync-2017-01-07-03AM.log
    -rw-r--r-- 1 root root 32426 Jan 10 03:40 rsync-2017-01-10-03AM.log
    -rw-r--r-- 1 root root 218679 Jan 13 13:23 rsync-2017-01-13-03AM.log

If the 3 days interval count working, after the "rsync-2016-12-31-03AM.log", the name of log file must be "rsync-2017-01-03-03AM.log". But it show "rsync-2017-01-01-03AM.log" instead.

Is it the crontab bug or it is supposed to behave like that?

Regards,
Hendrik

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu cron Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hendrik (hendrikkarsimin) said :
#1

Below is the Ubuntu version of the server.

Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.