Where do you define this?

|
armanhrshaikh 2022-08-11 20:57:20
unixusergroup-48885.jpg
I don’t know if you can see this.
coalio 2022-08-11 20:57:28
and new keyword makes everyone’s life easier when allocating something
BytesIO 2022-08-11 20:57:32
ur doing this on termux?
armanhrshaikh 2022-08-11 20:57:43
BytesIO 2022-08-11 20:57:32
ur doing this on termux?

Yes sir

BytesIO 2022-08-11 20:58:10
does termux runs 24/7 on ur phone?
armanhrshaikh 2022-08-11 20:58:32
BytesIO 2022-08-11 20:58:10
does termux runs 24/7 on ur phone?

Yes sir 24/7 for 365 days

armanhrshaikh 2022-08-11 20:59:03
It’s part of my company policy to keep termux Alive or leave the job.
BytesIO 2022-08-11 20:59:05
armanhrshaikh 2022-08-11 20:58:32
Yes sir 24/7 for 365 days

I don’t think cron supports month 🤔

raytracer9 2022-08-11 20:59:55
BytesIO 2022-08-11 20:59:05
I don’t think cron supports month 🤔

4th star is for month

BytesIO 2022-08-11 21:00:14
raytracer9 2022-08-11 20:59:55
4th star is for month

yes but check his code

BytesIO 2022-08-11 21:00:20
he put aug there
armanhrshaikh 2022-08-11 21:00:47
raytracer9 2022-08-11 20:59:55
4th star is for month

Yes total 5 starts
* * * * *
Minutes
Hours
Date
Month
Week

armanhrshaikh 2022-08-11 21:01:08
BytesIO 2022-08-11 21:00:20
he put aug there

Yes that support, I am already running since June

BytesIO 2022-08-11 21:01:58
armanhrshaikh 2022-08-11 21:01:08
Yes that support, I am already running since June

ok I am stepping back then, i have no idea

armanhrshaikh 2022-08-11 21:02:26
@marcotrosi should I source vim commands as answer?
armanhrshaikh 2022-08-11 21:02:54
Please suggest me on video conference if you are free tomorrow.

@marcotrosi

Kind regards.

BytesIO 2022-08-11 21:06:01
BytesIO 2022-08-11 20:48:15
one question I tried it and failed, so just to make sure.
we declare a char array of size 2
and we scanf %s, arr
does it compile?

when I run I get stack smashing detected

marcotrosi 2022-08-11 21:12:57
armanhrshaikh 2022-08-11 21:02:26
@marcotrosi should I source vim commands as answer?

I dont understand that question

armanhrshaikh 2022-08-11 21:16:16
crontab -e

Giving me option to edit my scheduled jobs but I want to redirect myjob.txt jobs inside crontab -e

marcotrosi 2022-08-11 21:19:30
the explanation still doesnt help
Fibonakki 2022-08-11 21:19:55
Summary
1. He is trying to take a txt file which has cron job lines defined in it.
2. He wants to take this text and redirect to crontab. Crontab -e puts him into vim.
marcotrosi 2022-08-11 21:20:40
ok
Fibonakki 2022-08-11 21:20:47
For that i think you should probably write directly to the crontab files. It’s a well defined directory name i think let me search. But idk if they encourage directly manipulating these files
marcotrosi 2022-08-11 21:21:34
as crontab -e opens vim you can load the file from there, and create a command or mapping that does that automatically
Fibonakki 2022-08-11 21:21:51
unixusergroup-48910.jpg

Fibonakki 2022-08-11 21:22:54
My way is hacky maybe. So go with @marcotrosi s solution
Fibonakki 2022-08-11 21:23:26
But if he smh needs to automate this for several servers or idk maybe he needs to update the crontabs daily for whatever reason then…
martito 2022-08-11 21:23:31
marcotrosi 2022-08-11 21:21:34
as crontab -e opens vim you can load the file from there, and create a command or mapping that does that automatically

it will, more accurately, open the editor the user has configurated in EDITOR environment variable😊

Fibonakki 2022-08-11 21:24:54
martito 2022-08-11 21:23:31
it will, more accurately, open the editor the user has configurated in EDITOR environment variable😊

It’d be cool to be able to change it to vscode))

marcotrosi 2022-08-11 21:29:08
armanhrshaikh 2022-08-11 21:16:16
crontab -e

Giving me option to edit my scheduled jobs but I want to redirect myjob.txt jobs inside crontab -e

command ReadCronJobs 1,$d|0read mycronjobs.txt

assuming you want to overwrite your complete crontab file

and then

:ReadCronJobs

Fibonakki 2022-08-11 21:30:23
marcotrosi 2022-08-11 21:29:08
command ReadCronJobs 1,$d|0read mycronjobs.txt

assuming you want to overwrite your complete crontab file

and then

:ReadCronJobs

Damn 😬👌 you can define your own vim functions?

Fibonakki 2022-08-11 21:30:31
Where do you define this?
marcotrosi 2022-08-11 21:30:36
vimrc
marcotrosi 2022-08-11 21:30:41
or whereever you want
marcotrosi 2022-08-11 21:30:48
but it’s a command
|