javan / javan/whenever

Overwrite log file (>) instead of append (>>) to it

Open
#748 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
8.9k
Forks
715
PR merge metrics
No merged PRs in 30d

Description

Is there option to use > instead of >> default's?

From here https://github.com/javan/whenever/wiki/Output-redirection-aka-logging-your-cron-jobs

  # adds ">> /path/to/file.log 2>&1" to all commands
  set :output, '/path/to/file.log'

I would like to always overwrite log file before write to it. ("> /path/to/file.log 2>&1")

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the :output setting and the Output redirection documentation linked in the issue. Trace how the default >> /path/to/file.log 2>&1 redirection is assembled, then determine how an option for > /path/to/file.log 2>&1 should be configured and documented. Done means users can select overwrite behavior without changing the default append behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.