More information is available in systemd.time(7). In the example below, the service runs at 22:30 on weekdays and at 20:00 on weekends. To run a service at different times, OnCalendar may be specified more than once. If you want something to run every day at 4am, use: When using the DayOfWeek part, at least one weekday has to be specified. To run a service on the first Saturday of every month, use: In the below example the service is run the first four days of each month at 12:00 PM, but only if that day is a Monday or a Tuesday. When more specific dates and times are required, OnCalendar events uses the following format:ĭayOfWeek Year-Month-Day Hour:Minute:SecondĪn asterisk may be used to specify any value and commas may be used to list possible values. ![]() When activated, it triggers the service immediately if it missed the last start time (option Persistent=true), for example due to the system being powered off: The following examples schedule foo.service to be run with a corresponding timer called foo.timer.Ī timer which will start 15 minutes after boot and again every week while the system is running.Ī timer which starts once a week (at 12:00am on Monday). If deleted, they will be reconstructed on the next start of their timer.Ī service unit file can be scheduled with a timer out-of-the-box. These are zero length files which mark the last time each timer was run.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |