<commit_before># Systemd Timers

## Service
	#/etc/systemd/system/journal-backup.service
	[Unit]
	Description=Backup journalctl

	[Service]
	ExecStart=/home/tobias/bin/ts-journal

## Timer
	#/etc/systemd/system/journal-backup.timer
	[Unit]
	Description=Journal Backup Service

	[Timer]
	OnBootSec=1m
	OnUnitActiveSec=5m

	[Install]
	WantedBy=timers.target

## Display Timer Status

	systemctl list-timers journal-backup.timer

## List Logs
	
	journalctl -u journal-backup


## Enable

	systemctl enable journal-backup.timer
	systemctl start journal-backup.{service,timer}<commit_msg>systemd: use OnCalendar= for timers<commit_after># Systemd Timers

## Service
	#/etc/systemd/system/journal-backup.service
	[Unit]
	Description=Backup journalctl

	[Service]
	ExecStart=/home/tobias/bin/ts-journal

## Timer
	#/etc/systemd/system/journal-backup.timer
	[Unit]
	Description=Journal Backup Service

	[Timer]
	OnCalendar=*:0/5:0 # every 5 minutes

	[Install]
	WantedBy=timers.target

## Display Timer Status

	systemctl list-timers journal-backup.timer

## List Logs
	
	journalctl -u journal-backup

## Reenable timer

	systemctl reenable --now journal-backup.timer


## Enable

	systemctl enable journal-backup.timer
	systemctl start journal-backup.timer

## OnCalendar Patterns

name | pattern
---|---
every 15 seconds | OnCalendar=*:*:0/15 
every 10 minutes | OnCalendar=*:0/10:0
{'fraction_non_alphanumeric': 0.11337209302325581, 'fraction_numerical': 0.012354651162790697, 'mean_word_length': 4.508, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5357325', 'n_tokens_mistral': 491, 'n_tokens_neox': 461, 'n_words': 101}