Is it possible to manually execute a single systemd timer-paired service unit for testing purposes?Where is /...

Defining a Function programmatically

Examples of simultaneous independent breakthroughs

Why do planes need a roll motion?

Melee or Ranged attacks by Monsters, no distinction in modifiers?

How to judge a Ph.D. applicant that arrives "out of thin air"

What do I do with a party that is much stronger than their level?

How did Mysterio have these drones?

Is there an antonym for "spicy" or "hot" regarding food (NOT "seasoned" but "spicy")?

How can religions be structured in ways that allow inter-faith councils to work?

Are the named pipe created by `mknod` and the FIFO created by `mkfifo` equivalent?

What is the most common end of life issue for a car?

Sci-fi change: Too much or Not enough

How to tar a list of directories only if they exist

Commercial jet accompanied by small plane near Seattle

Do the books ever say oliphaunts aren’t elephants?

Why is drive/partition number still used?

What language is Raven using for her attack in the new 52?

Is there a wealth gap in Boston where the median net worth of white households is $247,500 while the median net worth for black families was $8?

Unethical behavior : should I report it?

Does academia have a lazy work culture?

How can I write an interdental lateral in phonetic transcription?

If a 2019 UA artificer has the Repeating Shot infusion on two hand crossbows, can they use two-weapon fighting?

May a man marry the women with whom he committed adultery?

Why does Canada require mandatory bilingualism in all government posts?



Is it possible to manually execute a single systemd timer-paired service unit for testing purposes?


Where is / why is there no log for normal user systemd services?Using Cgroups with Systemd to restrict bash cpu & memoryHow to configure Systemd User Service with a TimerSystemd doesn't start a timer unitPrevent systemd timer from running on startupSystemd service not workingSystemd irregular timing issuesystemd multiple unit files for a single serviceStart systemd service with a “system” user to execute a bash scriptSystemd.path: Combine multiple conditions with a logical OR






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







18















I have a timer/service unit-set that should run once a day under --user conditions. It shows up with systemctl --user status and gets logged in journal but there is a part of the command that fails.



It seems that something in the command is not being interpreted correctly. I want to futz with the unit file and run the service, examine the log, etc to debug the issue; however editing the timer to trigger a minute in the future, waiting, and checking the log is... tedious.



Can do something like systemctl --user execute xxxxxx.service to just run the dang thing as if the timer triggered?










share|improve this question































    18















    I have a timer/service unit-set that should run once a day under --user conditions. It shows up with systemctl --user status and gets logged in journal but there is a part of the command that fails.



    It seems that something in the command is not being interpreted correctly. I want to futz with the unit file and run the service, examine the log, etc to debug the issue; however editing the timer to trigger a minute in the future, waiting, and checking the log is... tedious.



    Can do something like systemctl --user execute xxxxxx.service to just run the dang thing as if the timer triggered?










    share|improve this question



























      18












      18








      18


      1






      I have a timer/service unit-set that should run once a day under --user conditions. It shows up with systemctl --user status and gets logged in journal but there is a part of the command that fails.



      It seems that something in the command is not being interpreted correctly. I want to futz with the unit file and run the service, examine the log, etc to debug the issue; however editing the timer to trigger a minute in the future, waiting, and checking the log is... tedious.



      Can do something like systemctl --user execute xxxxxx.service to just run the dang thing as if the timer triggered?










      share|improve this question
















      I have a timer/service unit-set that should run once a day under --user conditions. It shows up with systemctl --user status and gets logged in journal but there is a part of the command that fails.



      It seems that something in the command is not being interpreted correctly. I want to futz with the unit file and run the service, examine the log, etc to debug the issue; however editing the timer to trigger a minute in the future, waiting, and checking the log is... tedious.



      Can do something like systemctl --user execute xxxxxx.service to just run the dang thing as if the timer triggered?







      systemd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 1 '15 at 16:17







      Gus

















      asked May 31 '15 at 12:50









      GusGus

      2032 silver badges8 bronze badges




      2032 silver badges8 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          11














          You can activate any unit manually, unless it contains a RefuseManualStart=yes and/or RefuseManualStop=yes directive (which do exactly what they say). Just issue systemctl --user start <whatever> (and systemctl --user stop <whatever> to do the opposite).



          To quote systemctl(1):




          start PATTERN...



          Start (activate) one or more units specified on the command line.



          <...>



          stop PATTERN...



          Stop (deactivate) one or more units specified on the command line.







          share|improve this answer


























          • Not working here: Failed to restart {foo}.service: Operation refused, unit {foo}.service may be requested by dependency only.

            – eMPee584
            Jul 9 at 18:01











          • @eMPee584 Since this answer was written, systemd gained new directives RefuseManualStart= and RefuseManualStop= (which do exactly what they say). I've updated my answer to mention that.

            – intelfx
            1 hour ago














          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f206637%2fis-it-possible-to-manually-execute-a-single-systemd-timer-paired-service-unit-fo%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          11














          You can activate any unit manually, unless it contains a RefuseManualStart=yes and/or RefuseManualStop=yes directive (which do exactly what they say). Just issue systemctl --user start <whatever> (and systemctl --user stop <whatever> to do the opposite).



          To quote systemctl(1):




          start PATTERN...



          Start (activate) one or more units specified on the command line.



          <...>



          stop PATTERN...



          Stop (deactivate) one or more units specified on the command line.







          share|improve this answer


























          • Not working here: Failed to restart {foo}.service: Operation refused, unit {foo}.service may be requested by dependency only.

            – eMPee584
            Jul 9 at 18:01











          • @eMPee584 Since this answer was written, systemd gained new directives RefuseManualStart= and RefuseManualStop= (which do exactly what they say). I've updated my answer to mention that.

            – intelfx
            1 hour ago
















          11














          You can activate any unit manually, unless it contains a RefuseManualStart=yes and/or RefuseManualStop=yes directive (which do exactly what they say). Just issue systemctl --user start <whatever> (and systemctl --user stop <whatever> to do the opposite).



          To quote systemctl(1):




          start PATTERN...



          Start (activate) one or more units specified on the command line.



          <...>



          stop PATTERN...



          Stop (deactivate) one or more units specified on the command line.







          share|improve this answer


























          • Not working here: Failed to restart {foo}.service: Operation refused, unit {foo}.service may be requested by dependency only.

            – eMPee584
            Jul 9 at 18:01











          • @eMPee584 Since this answer was written, systemd gained new directives RefuseManualStart= and RefuseManualStop= (which do exactly what they say). I've updated my answer to mention that.

            – intelfx
            1 hour ago














          11












          11








          11







          You can activate any unit manually, unless it contains a RefuseManualStart=yes and/or RefuseManualStop=yes directive (which do exactly what they say). Just issue systemctl --user start <whatever> (and systemctl --user stop <whatever> to do the opposite).



          To quote systemctl(1):




          start PATTERN...



          Start (activate) one or more units specified on the command line.



          <...>



          stop PATTERN...



          Stop (deactivate) one or more units specified on the command line.







          share|improve this answer















          You can activate any unit manually, unless it contains a RefuseManualStart=yes and/or RefuseManualStop=yes directive (which do exactly what they say). Just issue systemctl --user start <whatever> (and systemctl --user stop <whatever> to do the opposite).



          To quote systemctl(1):




          start PATTERN...



          Start (activate) one or more units specified on the command line.



          <...>



          stop PATTERN...



          Stop (deactivate) one or more units specified on the command line.








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 1 hour ago

























          answered May 31 '15 at 20:09









          intelfxintelfx

          3,35814 silver badges29 bronze badges




          3,35814 silver badges29 bronze badges













          • Not working here: Failed to restart {foo}.service: Operation refused, unit {foo}.service may be requested by dependency only.

            – eMPee584
            Jul 9 at 18:01











          • @eMPee584 Since this answer was written, systemd gained new directives RefuseManualStart= and RefuseManualStop= (which do exactly what they say). I've updated my answer to mention that.

            – intelfx
            1 hour ago



















          • Not working here: Failed to restart {foo}.service: Operation refused, unit {foo}.service may be requested by dependency only.

            – eMPee584
            Jul 9 at 18:01











          • @eMPee584 Since this answer was written, systemd gained new directives RefuseManualStart= and RefuseManualStop= (which do exactly what they say). I've updated my answer to mention that.

            – intelfx
            1 hour ago

















          Not working here: Failed to restart {foo}.service: Operation refused, unit {foo}.service may be requested by dependency only.

          – eMPee584
          Jul 9 at 18:01





          Not working here: Failed to restart {foo}.service: Operation refused, unit {foo}.service may be requested by dependency only.

          – eMPee584
          Jul 9 at 18:01













          @eMPee584 Since this answer was written, systemd gained new directives RefuseManualStart= and RefuseManualStop= (which do exactly what they say). I've updated my answer to mention that.

          – intelfx
          1 hour ago





          @eMPee584 Since this answer was written, systemd gained new directives RefuseManualStart= and RefuseManualStop= (which do exactly what they say). I've updated my answer to mention that.

          – intelfx
          1 hour ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f206637%2fis-it-possible-to-manually-execute-a-single-systemd-timer-paired-service-unit-fo%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...