Skip to content

removed random log#46

Open
gondo wants to merge 1 commit intomichelsalib:masterfrom
gondo:patch-1
Open

removed random log#46
gondo wants to merge 1 commit intomichelsalib:masterfrom
gondo:patch-1

Conversation

@gondo
Copy link

@gondo gondo commented Aug 5, 2014

#44

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This obviously cannot work, here the $file variable would be empty. You can simply delete the file after $process->run();

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeap, my fault. my comment was more towards the solution:

$job = '* * * * * command.sh';
$process = new Process('crontab '.$job);

to avoid unnecessary I/O

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it work with multiline crons?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure if i understand, can you give me some example?
if by multiple crons you mean multiple commands in one $file, than you can just simply call new Process multiple times, no?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you call $this->getRaw(), you get the fullist of crons that should replace the current cron table.
If you have several crons, they will be separated by PHP_EOL chars.
So my question is, when calling $process = new Process('crontab '.$this->getRaw().PHP_EOL); does it work?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see. well if you are replacing the whole crontab, than you would have to drop existing crons (duno how exactly crontab works, but google is our friend)
and adding crons like should work (again google is friend):
join(PHP_EOL, $this->getRaw())
ofc you would have to try
my point is, that doing unnecessary I/Os and creating mess in /tmp dir is messy

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well are you up to fix your PR then?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, sorry, not in the near future

@rmjspaz
Copy link

rmjspaz commented Nov 11, 2022

access_control:
    - { path: ^/admin, role: ROLE_ADMIN }

@rmjspaz
Copy link

rmjspaz commented Nov 11, 2022

#46
Duplicate of # #94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants