GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    scriptjunkie (sj@social.scriptjunkie.us)'s status on Tuesday, 11-Feb-2025 07:33:17 JST scriptjunkie scriptjunkie

    Creating a complicated bash script with simple prompts? Easy for AI.
    Schedule it to run at 1200 UTC each day? Every AI failed.
    Grok, Copilot, ChatGPT, Claude all scheduled it to run local time. ChatGPT at least mentioned it assumed your system was using UTC.

    Further prompting in most told me to set the TZ variable, which does not work, as it only affects the script's interpretation of time after it starts, not cron's interpretation of time.

    Most also eventually gave an option for converting local time to UTC, but this will fail on DST. Claude converted local time to UTC but then never used the local time.

    In conversation about 4 months ago from social.scriptjunkie.us permalink

    Attachments


    1. https://social.scriptjunkie.us/system/media_attachments/files/113/981/939/696/717/498/original/4507c0e3faccf7d9.png

    2. https://social.scriptjunkie.us/system/media_attachments/files/113/981/944/776/890/358/original/8c4c13909336f86f.png

    3. https://social.scriptjunkie.us/system/media_attachments/files/113/981/946/398/396/797/original/f6bad8e9051ebf69.png
    • Embed this notice
      scriptjunkie (sj@social.scriptjunkie.us)'s status on Tuesday, 11-Feb-2025 07:45:12 JST scriptjunkie scriptjunkie
      in reply to

      After several prompts and a system failure, ChatGPT eventually did provide a working solution using systemd. This was not faster than doing it by hand though.

      In conversation about 4 months ago permalink
    • Embed this notice
      scriptjunkie (sj@social.scriptjunkie.us)'s status on Tuesday, 11-Feb-2025 08:49:33 JST scriptjunkie scriptjunkie
      in reply to
      • Viraptor

      @viraptor that's a pretty heavy handed change there that will affect everything though.

      In conversation about 4 months ago permalink
    • Embed this notice
      Viraptor (viraptor@cyberplace.social)'s status on Tuesday, 11-Feb-2025 08:49:34 JST Viraptor Viraptor
      in reply to

      @sj cloude on first attempt includes the solution for me: "The cron daemon uses the system's time zone. If your system is not set to UTC, you may need to adjust the time accordingly or set the CRON_TZ environment variable to UTC in the crontab."

      In conversation about 4 months ago permalink
    • Embed this notice
      Eric Phelps (ericphelps@mastodon.social)'s status on Tuesday, 11-Feb-2025 10:02:21 JST Eric Phelps Eric Phelps
      in reply to

      @sj Systemd? How's that?

      I'd just set cron to start it hourly and have the script check the UTC time on each run. If it's the wrong time, it shuts down. That way you can keep it as a simple cron job for future maintenance.

      But knowing another way might be useful one day.

      In conversation about 4 months ago permalink
    • Embed this notice
      scriptjunkie (sj@social.scriptjunkie.us)'s status on Tuesday, 11-Feb-2025 10:02:21 JST scriptjunkie scriptjunkie
      in reply to
      • Eric Phelps

      @ericphelps you create a systemd service, then you create a systemd timer with the same name and use OnCalendar to set schedule throwing "UTC" as timezone on the end. It is neat I guess kind of, but the hourly in cron and script check is also what I would do.
      https://wiki.archlinux.org/title/Systemd/Timers

      In conversation about 4 months ago permalink

      Attachments


      1. https://social.scriptjunkie.us/system/media_attachments/files/113/982/547/282/751/431/original/8d3b6b664ff83f58.png
      2. No result found on File_thumbnail lookup.
        systemd/Timers - ArchWiki

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.