• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Cron not installed?

Scheduled Pinned Locked Moved Unsolved 20.04 Focal Fossa
33 Posts 5 Posters 5.0k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      RayCulp @RayCulp
      last edited by 16 Apr 2023, 16:02

      Perhaps this is the reason why Cron is missing? Maybe all I need to do is run unminimize?

      This system has been minimized by removing packages and content that are not required on a system that users do not log into.

      To restore this content, you can run the 'unminimize' command.

      7f291668-1fca-4575-86e3-7cc27dd76bec-image.png

      Happily running Ubuntu Touch on:
      Google Pixel 3a XL (20.04 Stable)

      R 1 Reply Last reply 16 Apr 2023, 16:42 Reply Quote 0
      • R Offline
        RayCulp @RayCulp
        last edited by RayCulp 16 Apr 2023, 16:42

        I think it is also worth mentioning that UBsync is the only tool for UT that I am aware of that actually synchronizes local copies of files on your phone with a Nextcloud server, but it is currently not offered in the OpenStore for UT20 because it is still being updated. Jan Belohoubek seems to be working very hard on updating it, so it will probably be ready within a few days. πŸ™‚

        As far as I can tell, GhostCloud, which is the only Nextcloud app currently offered in the OpenStore for UT20, is a WebDav client, not a sync tool. Can anyone confirm this?

        Happily running Ubuntu Touch on:
        Google Pixel 3a XL (20.04 Stable)

        1 Reply Last reply Reply Quote 0
        • I Ian referenced this topic on 16 Apr 2023, 17:27
        • A Offline
          arubislander @RayCulp
          last edited by arubislander 16 Apr 2023, 17:45

          @WQ6Z8X4U said in Cron not installed?:

          My question is whether it is okay to install Cron the normal way that you would on any Ubuntu system, by executing sudo apt-get install cron, or is there some other tool on UT20 that has replace Cron to execute tasks automatically?

          It is not okay to do so. Of course it is your device and you are free to do as you please with it. But anything you install via apt might be overwritten in a next OTA or whenever you switch update channels.

          Also, not sure cron would even work on UT 20.04. But try it out and report back.

          πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
          Happily running Ubuntu Touch
          Google Pixel 3a (20.04 DEV)
          JingPad (24.04 preview)
          Meizu Pro 5 (16.04 DEV)

          R 1 Reply Last reply 17 Apr 2023, 03:21 Reply Quote 1
          • R Offline
            RayCulp @arubislander
            last edited by RayCulp 17 Apr 2023, 03:21

            @arubislander said in Cron not installed?:

            It is not okay to do so.

            Ok, fair enough. I understand that generally speaking it is not supported to install anything via apt. Fine.

            @arubislander said in Cron not installed?:

            Of course it is your device and you are free to do as you please with it.

            This sound very much like "Doing this may void your warranty". Ok, I'm fine with that. πŸ™‚

            @arubislander said in Cron not installed?:

            anything you install via apt might be overwritten in a next OTA or whenever you switch update channels.

            If this's the worst that can happen, it's a non-issue. I'm happy to re-install whatever gets overwritten in the next OTA, as long as installing it doesn't actually break anything. Could it? If you don't know, who/where should I be asking?

            I can see now that my initial question was badly worded and invited a side discussion about Nextcloud sync tools and why I'm on my own if I do weird stuff to my phone. That completely misses the point.

            The point is: cron was available on UT16 and after OTA update to UT20 it's gone. Why is it gone? Was it just forgotten? Is it not yet compatible with UT20? Was there some other reason? Will it be added later? I want to understand. If this is not the right place to ask, I'll be glad to raise and issue on Gitlab or whatever is more appropriate.

            Happily running Ubuntu Touch on:
            Google Pixel 3a XL (20.04 Stable)

            L 1 Reply Last reply 17 Apr 2023, 06:39 Reply Quote 0
            • L Offline
              Lakotaubp @RayCulp
              last edited by Lakotaubp 17 Apr 2023, 06:39

              @WQ6Z8X4U You could try asking that here https://t.me/ubports_pixel3a or the main group here https://t.me/ubports

              R 2 Replies Last reply 17 Apr 2023, 10:27 Reply Quote 0
              • R Offline
                RayCulp @Lakotaubp
                last edited by 17 Apr 2023, 10:27

                @Lakotaubp

                Thank you for this suggestion. I just asked this question in the Pixel 3a Telegram group, and there appears to be no clear information as to why cron is now missing, but I did receive a very useful recommendation to use systemd timers instead.

                Happily running Ubuntu Touch on:
                Google Pixel 3a XL (20.04 Stable)

                A 1 Reply Last reply 17 Apr 2023, 10:56 Reply Quote 0
                • R Offline
                  RayCulp @Lakotaubp
                  last edited by 17 Apr 2023, 10:46

                  @Lakotaubp Do you know how I can mark this topic as solved?

                  Happily running Ubuntu Touch on:
                  Google Pixel 3a XL (20.04 Stable)

                  L 1 Reply Last reply 17 Apr 2023, 12:50 Reply Quote 0
                  • A Offline
                    arubislander @RayCulp
                    last edited by 17 Apr 2023, 10:56

                    @WQ6Z8X4U I would like to add some clarification.

                    The cron packages were not 'removed' on purpose. Rather, they are no longer included in the base image because there were no other packages or features in UT that depended on them.

                    So you should not expect them to make a reappearance until or unless some feature in the OS requires it.

                    Since you have been using cron jobs already in the past and were thus doing 'unsopported stuff' I would say, go ahead and install the packages you need, although there is a small chance that it might mess up a next update. So on further reflection, maybe don't do that πŸ™‚

                    The suggestion to look into SystemD Timers is a good one. I for one would be eager to hear about your findings.

                    πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                    Happily running Ubuntu Touch
                    Google Pixel 3a (20.04 DEV)
                    JingPad (24.04 preview)
                    Meizu Pro 5 (16.04 DEV)

                    R M 2 Replies Last reply 17 Apr 2023, 11:36 Reply Quote 1
                    • R Offline
                      RayCulp @arubislander
                      last edited by 17 Apr 2023, 11:36

                      @arubislander said in Cron not installed?:

                      The cron packages were not 'removed' on purpose. Rather, they are no longer included in the base image because there were no other packages or features in UT that depended on them.

                      Thank you so much for this information! ❀

                      @arubislander said in Cron not installed?:

                      The suggestion to look into SystemD Timers is a good one. I for one would be eager to hear about your findings.

                      Yes, I agree that this is a better option than re-installing cron. I will test it out and add corresponding comments to threads here in the forum that recommend using cron, if it is ok with the moderators here that I might be "necroing" some older threads.

                      Happily running Ubuntu Touch on:
                      Google Pixel 3a XL (20.04 Stable)

                      A 1 Reply Last reply 17 Apr 2023, 11:38 Reply Quote 0
                      • A Offline
                        arubislander @RayCulp
                        last edited by 17 Apr 2023, 11:38

                        @WQ6Z8X4U I am one of the moderators and you have my blessing. This would be necro-ing for a worthwile cause πŸ™‚

                        πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                        Happily running Ubuntu Touch
                        Google Pixel 3a (20.04 DEV)
                        JingPad (24.04 preview)
                        Meizu Pro 5 (16.04 DEV)

                        1 Reply Last reply Reply Quote 2
                        • L Offline
                          Lakotaubp @RayCulp
                          last edited by 17 Apr 2023, 12:50

                          @WQ6Z8X4U Topic Tools (cog wheel top right) Ask as question then mark as Solved. πŸ™‚

                          R 1 Reply Last reply 18 Apr 2023, 10:28 Reply Quote 0
                          • R Offline
                            RayCulp @Lakotaubp
                            last edited by 18 Apr 2023, 10:28

                            @Lakotaubp Thanks! I think I'll wait a bit to mark it solved though, as I would like to add some information about systemd timers in a few days. πŸ™‚

                            Happily running Ubuntu Touch on:
                            Google Pixel 3a XL (20.04 Stable)

                            R 1 Reply Last reply 19 Apr 2023, 08:20 Reply Quote 0
                            • R Offline
                              RayCulp @RayCulp
                              last edited by 19 Apr 2023, 08:20

                              I just wanted to briefly report back.

                              Synchronization continues to work perfectly if I manually execute the command in a terminal.

                              Setting it up to execute automatically with a systemd service and timer is more challenging than expected because Syncevolution is throwing errors that it did not before with cron. I have no idea whether it is because I'm doing something wrong (I just started learning about init / systemd a week ago), or whether it's because files/functions are missing, like cron is. I think the best course of action will be to try to get it to work first on an Ubuntu desktop system where I can be sure it's not missing files/functions. Then I can try to replicated that on UT. It may take a while though.

                              Happily running Ubuntu Touch on:
                              Google Pixel 3a XL (20.04 Stable)

                              R 1 Reply Last reply 21 Apr 2023, 06:11 Reply Quote 0
                              • R Offline
                                RayCulp @RayCulp
                                last edited by RayCulp 21 Apr 2023, 06:11

                                I'm afraid I can't spend any more time on this right now, so I'm going to have to wrap it up: Here are the key points:

                                • cron is gone in UT 20 and is not coming back
                                • Anything that relied on cron previously does not work anymore.
                                • The recommendation I received from a member of UT's core development team is to use systemd timers instead.
                                • I have tried countless variations and combinations of bash script files and systemd services over the past two days, but I am unable to get a systemd service to sucessfully execute a Syncevolution synchronization.
                                • I suspect that this has something to do with the requirement to export the DISPLAY and DBUS_SESSION_BUS_ADDRESS variables as well as the user account used to execute the syncevolution command, but I do not have the expertise to solve the problem at this time.

                                Happily running Ubuntu Touch on:
                                Google Pixel 3a XL (20.04 Stable)

                                P R 2 Replies Last reply 21 Apr 2023, 09:17 Reply Quote 1
                                • R RayCulp marked this topic as a question on 21 Apr 2023, 06:12
                                • P Offline
                                  prophanetes @RayCulp
                                  last edited by 21 Apr 2023, 09:17

                                  @WQ6Z8X4U Thanks for keeping us in the loop! I totally appreciate your efforts here. This definitely captured my attention. I am itching to get my hands dirty with systemd timers myself... but also short on time.

                                  1 Reply Last reply Reply Quote 1
                                  • R Offline
                                    RayCulp @RayCulp
                                    last edited by 23 Apr 2023, 15:30

                                    I have solved the problem and will post a detailed guide on how to set up automated Syncevolution sychronization of contacts with Nextcloud (CardDav) using a systemd service and timer in the next few days.

                                    Happily running Ubuntu Touch on:
                                    Google Pixel 3a XL (20.04 Stable)

                                    R 1 Reply Last reply 23 Apr 2023, 15:59 Reply Quote 2
                                    • R Offline
                                      RayCulp @RayCulp
                                      last edited by RayCulp 23 Apr 2023, 15:59

                                      There is one important caveat, however:

                                      Earlier tutorials for using Syncevolution with cron under UT 16 employed a type of command substitution syntax to export the environment variable DBUS_SESSION_BUS_ADDRESS:

                                      export DBUS_SESSION_BUS_ADDRESS=$(ps -u phablet e | grep -Eo 'dbus-daemon.*address=unix:abstract=/tmp/dbus-[A-Za-z0-9]{10}' | tail -c35)
                                      

                                      I was unable so far to get this command substitution working with a systemd service, so the service I am currently using has a static value for the environment variable:

                                      Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/32011/bus"
                                      

                                      This value of the DBUS_SESSION_BUS_ADDRESS for the user phablet is what I get when I run echo $DBUS_SESSION_BUS_ADDRESS.

                                      However, using a static value does not seem to cause any problems because, unlike UT 16, UT 20 does not seem to change the value of DBUS_SESSION_BUS_ADDRESS each time you reboot the system.

                                      Can anyone confirm that this value is always the same, or are there still situations in which DBUS_SESSION_BUS_ADDRESS might be given a new value?

                                      If it's always the same, then in new tutorials we can recommend that users get the value of DBUS_SESSION_BUS_ADDRESS one time with echo $DBUS_SESSION_BUS_ADDRESS and use that value in the service.

                                      If it does not always remain the same, then we will need to find a way to get the command substitution working to grab the value dynamically each time.

                                      Happily running Ubuntu Touch on:
                                      Google Pixel 3a XL (20.04 Stable)

                                      R 1 Reply Last reply 24 Apr 2023, 20:40 Reply Quote 0
                                      • R Offline
                                        RayCulp @RayCulp
                                        last edited by 24 Apr 2023, 20:40

                                        @WQ6Z8X4U said in Cron not installed?:

                                        Can anyone confirm that this value is always the same, or are there still situations in which DBUS_SESSION_BUS_ADDRESS might be given a new value?

                                        This question has now also been answered by the people at my local Linux user group.

                                        In the expression DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/32011/bus, the number 32011 corresponds to the UID, so it does not change between system reboots.

                                        Happily running Ubuntu Touch on:
                                        Google Pixel 3a XL (20.04 Stable)

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          mschmids @arubislander
                                          last edited by mschmids 27 Apr 2023, 07:39

                                          @arubislander said in Cron not installed?:

                                          Since you have been using cron jobs already in the past and were thus doing 'unsopported stuff...

                                          Admittedly a bit late to the party, but with reference to the chapter CalDAV and CardDAV syncing from the UBports documentation, I would like to respectfully circle back to the "unsupported" claim in the above.

                                          Furthermore I follow the top down dependency argument for the packages being pulled in, however this necessary concludes a defined top, presumably done manually.

                                          A 1 Reply Last reply 27 Apr 2023, 09:22 Reply Quote 0
                                          • A Offline
                                            arubislander @mschmids
                                            last edited by arubislander 27 Apr 2023, 09:22

                                            @mschmids said in Cron not installed?:

                                            Admittedly a bit late to the party, but with reference to the chapter CalDAV and CardDAV syncing from the UBports documentation, I would like to respectfully circle back to the "unsupported" claim in the above.

                                            And I would like to call attention to the note on the first page of that section of the documentation.
                                            While it does not say 'you are on your own if you do any of these' as clearly as I would like, it does warn that the user is going off the recommended path.
                                            In general in UT making your system r/w means doing unsupported stuff that might break your device on an update, or is not guaranteed to continue working (or as we have now seen, even being possible) after.

                                            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                                            Happily running Ubuntu Touch
                                            Google Pixel 3a (20.04 DEV)
                                            JingPad (24.04 preview)
                                            Meizu Pro 5 (16.04 DEV)

                                            R 1 Reply Last reply 27 Apr 2023, 12:43 Reply Quote 1
                                            13 out of 33
                                            • First post
                                              13/33
                                              Last post