Tag Info

New answers tagged

2

You need to create two files: one for service, other for timer with same name. example: /etc/systemd/system/test.service [Unit] Description=test job [Service] Type=oneshot ExecStart=/tmp/1.sh /etc/systemd/system/test.timer [Unit] Description=test [Timer] Persistent=true OnUnitActiveSec=10s OnBootSec=10s [Install] WantedBy=timers.target after that ...


1

The production-ready scheduling facility on Unix systems is cron. Logging issues Cron logs what it does to the system logs. It sends the output of jobs, if any, over email. retrying tasks on failure Cron doesn't do that, for good reason. Retrying tasks on failure is business logic. How would the system know which failures should lead to retrying ...


2

Actually, cron is production-ready. It's been battle-tested so many times it's hard to accuse it of malfunctioning. What you might be experiencing is issues resulting from simple errors. It would help a lot if you specified what your problems with cron are, exactly. As already pointed out by gaueth, you can append >> /tmp/somefile 2>&1 to you ...


0

I have grown quite fond of Jenkins CI for all kinds of 'cron on steroids' tasks. I use it to make and restore backups, clean up stale files/dirs, custom routines involving multiple steps etc... Basically anything that can be automated. The logging is great and the features you seem to need are either in there by default or easily added with one of the many ...


1

You can use > /tmp/logfile 2>&1 after your crontab scheduled command to redirect output from the commands to a log file. Also check out gnome-schedule for a graphical UI to play around with crontab and at.



Top 50 recent answers are included